-
Notifications
You must be signed in to change notification settings - Fork 449
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
Further Notes On Extends #37
Comments
I guess this means something like:
with result:
I.e. |
Except its reverse.. the extending selector goes last in the list? (I guess depending on the definition of extending selector). Also the xamples that were around this were the wrong way round too. I think I worked it into some of the sentences anyway that it is added on to the end of the selector list. |
I did all of the initial docs for extends while we were still discussing how you were going to implement it, so I imagine a lot of it was wrong |
Actually those "extending" and "extended" labels are not so easy to define unambiguously. Hence sometimes we can even confuse ourselves.
However, since it's
so it's
so it's
:) It all depends on how exactly one defines "extend" (as English word not as LESS keyword) in context of CSS classes... and the flip point is very thin and subtle... (Luckily examples make things unambiguous). |
Cool Jon, thanks, makes sense now & feel free to critique or add to the |
things to do, add etc. From the extend documentation
I wanted to leave the extend documentation releasable, however the following are notes that I removed which it may make sense to add later once they have been expanded upon.
Most of this is from @jonschlinkert
The purpose of this section is to better understand how the
:extend
feature ought be used, thinking in terms of best practices, in order to help prioritize development decisions, and to qualify or disqualify feature requests related to this feature.Repetitious Code
The
:extend
feature seems to hold the most promise as a device for:2.
:extend
directive to a selector (or ruleset of a selector) allows you to add the styles of that selector to any other selectors,Don't understand:
Notice that the Extending selector was grouped before the Extended selector. This was chosen not for stylistic reasons, but to be behaviorally consistent with the expected order of inherited declarations within the block.
TODOs:
Specificity
Order of Inherited Declarations
Mixins <-- just do later?
Selectors
Type Selectors
Simple Selectors
Combinators
Pseudo-Elements
Extends with Mixins
TODO: that it is planned
Extends, Mixins, "Empty" Mixins, and Placeholders
TODO
We want :extend to make our lives easier by DRYing up our stylesheets, but only when :extend cannot "pierce the context barrier" of the selector you wish to extend. So within the same context the goal is to prevent order to prevent :extend from poluting styles
The text was updated successfully, but these errors were encountered: