-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
automatically style first and last breadcrumb #358
Conversation
gronke
commented
Oct 3, 2017
- The first breadcrumb item appeared to be off by -4px
- The last breadcrumb item does not require manual styling
3778124
to
c369635
Compare
The build is currently failing because of the usage of type selectors.
It might be possible to work with globs to work around the type selectors, but that's certainly not the most elegant solution if the breadcrumbs are supposed to be used in nav elements. |
Hi @gronke, thanks for this. We try to avoid styling type selectors whenever possible, and we tend not to scope component styles with unrelated selectors, as in If you think that there's an issue with the existing styles, we welcome an issue with well-defined test cases. Cheers! |
Hi there @gronke, sorry for closing this so abruptly. We'd like to incorporate your PR, but to scope it a bit more narrowly. Here's what would need to change:
Let me know if you're interested in making these updates, and we can reopen the PR. Thanks again! |
Hi @shawnbot, that's absolutely fine - the changes I proposed broke with your code style rules. Do you want me to create an issue? Thank you for considering to re-open this PR, but I would not mind if you re-apply the changes in one of your commits.
Btw. have you considered being explicit with styles rather than relying on a reset stylesheet? I am working on native web components built from primer-css and need to inject it into each custom elements ShadowDom. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.breadcrumb-item-selected { | ||
&::after { | ||
content: none; | ||
} | ||
} | ||
|
||
nav ol:first-child .breadcrumb-item { | ||
margin-left: 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of this whole block can you remove the margin-left: -$spacer-1;
line.
@@ -12,8 +12,13 @@ | |||
} | |||
} | |||
|
|||
nav ol:last-child .breadcrumb-item, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too specific here, instead will you drop the nav ol
and just leave :last-child .breadcrumb-item
@jonrohan thanks for the review! I've addressed your comments and verified the output does not look broken on Chrome and Firefox. |
074f9c0
to
a9c18d0
Compare