I'm giving XP to this post because I feel it clearly explains the conditions that ought to be met before someone can hide successfully, with excellent clear examples of how the elf's and halfling's exceptions work.
Lots of people are saying the same thing, but not so clearly and succintly. Nice job, Uller.

Nice Illustration UllerThank you.
I said early in the thread that the "halfling in a box/wood-elf behind a fern" examples are pretty useless because they don't happen at the table.
I think @Plaguescarred and I are actually in agreement on how we would run things at the table. We're just focussed on two different things. To me, hiding ALWAYS involves mitigating factors. Every situation is different. No one (imxp) ever attempts to hide like this while claiming to be in dim light.
View attachment 79369
But if Krunk had the skulker feat and was far enough from the peasants to be lightly obscured by the dim light, then yeah...he could hide, even if they already saw him (or if he didn't have that feat he could hide if they had not spotted him yet). As soon as they got close enough that he was no longer lightly obscured, he'd be revealed automatically. YMMV.
Nice Illustration Uller![]()
Lightly obscured, while it has mechanics associated with it, is none the less ALSO has natural language meaning. That's why when you are behind light foliage, you are lightly obscured, which prevents the natural meaning of "seen clearly".
Are you saying the intended limitation on hiding is you can't hide from a creature that can see you 100% clearly and that if you are the tiniest bit obscured then the visual requirement for hiding is satisfied?
As a DM i use this rule of thumb; if the location/positioning you need to adopt to make a range attack would not be viable to try to hide because others can see you clearly enought, then you don't remain hidden when poping out this way. Out of combat, popping out this way could let you remain hidden from distracted creatures that are unaware of you though.The question ought to be . . . should one be able to use a resource (an action) to make a stealth check in order to gain a benefit (advantage on an attack) from being stealthy about the timing of a ranged attack.

(Dungeons & Dragons)
Rulebook featuring "high magic" options, including a host of new spells.