-
-
Notifications
You must be signed in to change notification settings - Fork 75
mention restriction about nested rules starting with an identifier #868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @mayank99, thank you for contributing!
The readme starts with a note that this plugin follows the specification. It must have also given a warning to make it clear that this was not supported. I am a bit hesitant to add this to the readme for multiple reasons :
We do sometimes have docs about such aspects but mostly to avoid confusion when the "transpiled css" is not what people might expect : |
@romainmenke You're right, there is a warning. I think I missed that, because the build still passes.
hmm, based on recent discussions, i thought the nesting spec was mostly finalized. Maybe not.
i agree, it does not make sense to document it in detail, but this does directly affect the use of the plugin. plus, this nuance is very easy to miss in the spec. would you accept the PR if i trim it down to just a couple lines? |
Hehe no, the issue is not that it is long or short :) It is just that I am hesitant to take on the role of explaining and documenting the feature itself. Especially given the state of the feature/specification and the complexity of the feature. I think it might make sense to add some extra docs up until there are good docs on MDN and enough blog posts explaining this. |
This reverts commit 5f68046.
- move to readme template - add reference to plugin warning - add one more example
@mayank99 I've made a few tweaks and copied it over to the readme template.
What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
included the warning so that people can find this when they google the warning text
This makes perfect sense! Including the warning makes it even more relevant to this project (rather than simply explaining the spec), and users know what to expect before installing the plugin.
I think it might make sense to add some extra docs up until there are good docs on MDN and enough blog posts explaining this.
Exactly. I think docs should actively try to educate on the concepts that lie at the boundaries of what the code/package is designed for, or at the very least provide a pathway for the user to learn. In the future when there are better resources on this topic, the note could be removed and a link might suffice.
Only suggestion I have is to pin to the current version of the spec, in case the link to "Example 4" changes.
Co-authored-by: Mayank <9084735+mayank99@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this @mayank99 🎉
Thank you for merging the PR! I know it can be a maintenance burden, so it is extra appreciated 💜 |
the latest css nesting spec disallows this for technical reasons:
when i first upgraded to postcss-nesting 11.0, i was under the impression that such syntax would be supported, because those technical limitations do not exist outside browsers. so i was very surprised when #861 was released in 11.2.1 and my styles broke.
this note will help avoid such unexpected surprises for users of
postcss-nesting
.