-
Notifications
You must be signed in to change notification settings - Fork 6
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
Edge cases #1
Comments
Great work so far! One thing to think about if you havent already is when you have something like the following: <section class="article-title">
<div class="container">
<span class="text"></span>
<span class="text -light"></span>
</div>
</section> The .container {
max-width: 1280px;
margin: 0 auto;
} So possibly an option to add a |
We usually style those like .article-title > .container > .text - so On Tue, Sep 20, 2016, 7:21 PM DustinJSilk [email protected] wrote:
|
Ah, and |
I'd like to say regarding point 4: RSCSS allows for styling children from parents when you're building layouts like so (taken from the docs): .article-list {
@include clearfix;
> .article-card {
width: 33.3%;
float: left;
}
} Of course, it's up to the developer to only apply sizing and positioning styles when doing this because as stated previously, it can lead to specificity issues. I think this is a fine candidate for being a customizable rule. |
I would advise against enforcing a rule that allows component-in-component styling: personally, I prefer to assign an element-like class to the child component and use it to position and size it, like this .article-list {
@include clearfix
/*
* Child component would be <div class="card article-card"></div>
*/
> .card {
width: 33.3%;
float: left;
}
} I am quite new to stylelint (I've been toying with it for a couple of days), but, as the RSCSS spec explicitly allows component nesting, I think this case could be treated as a warning level violation. |
Here are some cases in existing code bases that stylelint-rscss reports as errors. Maybe they should be adjusted for consideration.
.my-table > * > tr > td > a:visited
(depth 4).a.-home
) are an error, because variants expect themselves to be attached to elements.btn
,jumbotron
,container
, etc. They don't conform to RSCSS, but you can't really do anything about that in a Bootstrap project. — there's nowcomponentWhitelist
to alleviate this..form-fieldset > .form-control
. Not sure what should be done here; it's a bad practice (it can lead to specificity issues and mental overhead), but it's a practice that's quite common.+
and~
aren't treated properly: eg,.form-row + .form-row
considers the secondform-row
as an element.The text was updated successfully, but these errors were encountered: