-
Notifications
You must be signed in to change notification settings - Fork 34
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
considering removing locations #30
Comments
I don't think they are really needed. The use cases can easily be achieved in other ways, like a simple option for some custom page that is a little different. |
+1 |
+1 for anything that anything that drops using |
Planning on removing locations. @stinoga the id will still be used for tweaks, unless we can think of some other clever way to make them automatically override any level of nested components/parts/options. |
@geddski If you are still thinking of removing @Locations, maybe you should do so before too many people marry themselves to it. Or at least remove it from the http://csstyle.io page to discourage it's use. Thoughts? |
+1 |
that is a good idea. I'll remove it from the docs and tests to start. |
He's alive! |
@jesseleite indubitably :) |
http://www.csstyle.io/ updated to remove locations. |
Good job @geddski ! |
This should be closed, right :)? |
After some great feedback from Paul Irish and a lot of brainstorming, I think we could probably remove locations entirely. Locations' purpose are to allow consumers of a component to override aspects of the component when it's being used in a certain context. It's a common use case and csstyle needs to support it. Locations have a couple of problems however:
id
they automatically override every part of component, including its options. So if you wanted to override the base style of a component using a location but leave it alone when it's using an option, you're out of luck.I think components themselves provide enough context:
And they do this with a single class name rather than an id. The only problem with this is that options and parts also only add a single class name. This would lead to load-order importance which is something csstyle is supposed to handle for you. One option would be to have csstyle add another class onto the parts & options selectors that get generated so that they are automatically more specific than the base styles applied to a component inside of another component.
I'm open to ideas and feedback before making a breaking change like this.
The text was updated successfully, but these errors were encountered: