-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Column CSS doesn't override row column default css when row-cols-[breakpoint]-[x] is used. #33530
Comments
I don't think we designed them to do allow for that override—it was built as either or, not both. Unsure if we wanna take it this direction and allow that. |
The fifth example in the documentation shows it being used that way. And since the example doesn't use a breakpoint it works, so we're getting inconsistent behavior? https://getbootstrap.com/docs/5.0/layout/grid/#row-columns
|
Oh shit, my bad. And I wrote the thing lol. Let's fix it! |
I did notice that the documentation doesn't explicitly say cols should overwrite the row "shortcuts" - but it seems the documentation should be made explicitly clear (and it follows order of specificity in my head!) if this is fixed. In the existing documentation the closest I could find: My first bug here - but been (consuming) bootstrap for awhile - wasn't sure if this was a bug or if I wasn't understanding or if there was some other reason it wasn't working consistently. |
There's at least some confusion in the docs, I agree. The part you're quoting implicitly talks about specificity though: targetting the element itself (single class) or the parent (at least a class and a selector). The latter wins. Needs to be made clearer in the docs, not sure either those should work together. |
I made a change in the order the cols and row-cols is compiled and submitted pull request #33621 along with a change to the The pull request is admittedly opinionated and makes it official that row-cols isn't a(n inconsistent) shortcut, it's a default for columns in the row that can be overridden at the column level. I'm a newbie at contributing scss changes, wasn't sure how to test besides |
Not sure where you're all focused on, looks like this stalled out - I'm still happy to help out if more changes needed - see my comments in the proposed pull request. |
@danielkauffman - it breaks, example here: https://codepen.io/Lacutah/pen/mdWNPyR |
OS: Windows 10
Browser: Chrome, Firefox, Edge latest
Version: 5 beta 3
Area: Grid
Apparent Problem: Column CSS doesn't override row column default css when row-cols-[breakpoint]-[x] is used.
My Expectation: Column specific classes should always override row class
Example: CodePen Example
The current order of CSS appears to be wrong:
I would expect it to be:
The text was updated successfully, but these errors were encountered: