-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Adds lost-column: none rule #211
Conversation
I've been working with the fork that led to this feature, and it's great utility to have. Name wise, it makes sense that it doesn't touch the |
@alex-ketch Was that my fork from a while ago before I took the main repo or did you make your own? I'll look into having a |
@peterramsing I was using your fork from before you took over the main repo. |
@alex-ketch Cool! I'll hopefully have 6.7.0 out shortly to hopefully integrate this. Feel free to chime in on #217 and share any thoughts there as well! |
I know I said I liked Just my 2 cents. Feel free not to worry about it as this isn't a huge deal or anything. What do you guys think before merging in this API? |
I know |
I pondered this for a bit. What about adding two more values. foo {
lost-column: inherit;
} The outputted CSS is: foo {
width: inherit;
}
foo:last-child {
float: inherit;
clear: inherit;
margin-right: inherit;
width: inherit;
}
foo:nth-child(n) {
float: inherit;
clear: inherit;
margin-right: inherit;
width: inherit;
}
foo:nth-child(1n + 1) {
float: inherit;
clear: inherit;
margin-right: inherit;
width: inherit;
}
foo:nth-child(1n) {
float: inherit;
clear: inherit;
margin-right: inherit;
width: inherit;
} Then another to go back to W3C defaults. foo {
lost-column: reset;
} The outputted CSS is: foo {
width: auto;
}
foo:last-child {
float: none;
clear: none;
margin-right: 0;
width: auto;
}
foo:nth-child(n) {
float: none;
clear: none;
margin-right: 0;
width: auto;
}
foo:nth-child(1n + 1) {
float: none;
clear: none;
margin-right: 0;
width: auto;
}
foo:nth-child(1n) {
float: none;
clear: none;
margin-right: 0;
width: auto;
} @alex-ketch You've been using this in production. Do you have any thoughts? RE: your codebase, could you do a find a replace or do you think that also having a rule for "none" to retain some backwards compatibility would be a good idea? The reasoning behind this thought process is to let the rules self document a bit better. |
Why |
@corysimmons Because it's a self documenting value. Plus it's not resetting it as much as it's telling it to inherit the rules of its parent. I'm not stuck on it, just like how it self documents. |
I like how it self-documents too, but I don't see a need for it. Will there ever be a use case where someone might want to inherit all those particular values? |
My personal preference is for Not sure on the use case for Regardless of the syntax, I'd just be happy to see this feature in the library 👍 |
|
@corysimmons Don't tempt me with Per these comments I propose that it remains |
@peterramsing I think backwards compatibility wise, find-and-replace as you suggested would easily suffice no matter the final term. |
@alex-ketch, I think we commented right at the same time. Quite epic. Regarding |
@peterramsing My hesitation is that I don't want to muddle what |
@alex-ketch I like that thought process. Maybe something for later, then for the "reset". |
As I'm sifting through code right now ( #208 ) and see that there is a |
I think this is good to merge pending any final issue with the rule being |
👍 |
Adds the rule "none" to the "lost-column" property to set it back to browser defaults.
Cool. You might want to start deleting these branches as you merge. You can always |
@corysimmons Cool–yeah, I hadn't done that yet for this. It was late. Thanks for catching that. 😄 Now I'm starting to understand why other maintainers of active setup orgs to hold their repos so they can have forks of it where they code... |
And it allows you to group related repositories such as examples or independent add-ons. LostGrid is available, you should snag it. |
@zephraph I grabbed it. For now I think I'll leave the repo under me as we just did a transition. Maybe with v7 it will move. So much to do, so little time. |
I love the idea of an org. If you name it something more abstract than LostGrid it'd be cool. Like these Sass dudes have https://github.com/at-import and have a pretty cool grid in it alongside a bunch of other cool stuff. I might get a hair up my ass to make an insane themeable PostCSS UI kit one of these days. Feel free to keep it in your name to rack up some resume points while you do free work though. :^) I'm getting totally obsessed with Python for the time being. |
I was looking at the tests and it appears that it('provides none rule', function() {
check(
'a { lost-column: none; }',
'a { width: auto; }\n' +
'a:last-child { float: none; clear: none; margin-right: 0; width: auto; }\n' +
//duplicate, looking at the code above this should be `a:nth-child(n)` ???
'a:nth-child(1n) { float: none; clear: none; margin-right: 0; width: auto; }\n' +
'a:nth-child(1n + 1) { float: none; clear: none; margin-right: 0; width: auto; }\n' +
//duplicate
'a:nth-child(1n) { float: none; clear: none; margin-right: 0; width: auto; }'
);
}); |
@artisin Hmm. Yes, that does look to be a duplicate. I'll create a new issue. |
This adds a rule to
lost-column
where when you passnone
in, the lost-column is reset to browser defaults.