Skip to content
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

[Breadcrumbs] inline SVG icons #2742

Merged
merged 2 commits into from
Jul 31, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
inline breadcrumbs icons
trickier because color gets embedded in icon so it requires re-embedding for dark theme.
skipped that and just used colors that look good enough in both.
  • Loading branch information
Gilad Gray committed Jul 31, 2018
commit 92c484c8db06090c684a5858726a75c482fd454b
24 changes: 12 additions & 12 deletions packages/core/src/components/breadcrumbs/_breadcrumbs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ Markup:
Styleguide breadcrumbs
*/

// shaving off 1px for perfect centering (... icon is 5px high)
$breadcrumb-line-height: $pt-icon-size-large - 1px !default;

.#{$ns}-breadcrumbs {
display: flex;
flex-wrap: wrap;
Expand All @@ -39,10 +36,12 @@ $breadcrumb-line-height: $pt-icon-size-large - 1px !default;
align-items: center;

&::after {
@include pt-icon();
padding: 0 ($pt-grid-size / 2);
color: $pt-icon-color;
content: $pt-icon-chevron-right;
display: block;
margin: 0 ($pt-grid-size / 2);
background: svg-icon("16px/chevron-right.svg", (path: (fill: $pt-icon-color)));
width: $pt-icon-size-standard;
height: $pt-icon-size-standard;
content: "";
}

&:last-of-type::after {
Expand All @@ -55,7 +54,6 @@ $breadcrumb-line-height: $pt-icon-size-large - 1px !default;
.#{$ns}-breadcrumb-current,
.#{$ns}-breadcrumbs-collapsed {
display: inline-block;
line-height: $breadcrumb-line-height;
font-size: $pt-font-size-large;
}

Expand Down Expand Up @@ -92,12 +90,14 @@ $breadcrumb-line-height: $pt-icon-size-large - 1px !default;
border-radius: $pt-border-radius;
background: $light-gray1;
cursor: pointer;
padding: 0 ($pt-grid-size / 2);
padding: 1px ($pt-grid-size / 2);

&::before {
@include pt-icon($pt-icon-size-large);
line-height: $breadcrumb-line-height;
content: $pt-icon-more;
display: block;
background: svg-icon("16px/more.svg", (circle: (fill: $pt-icon-color))) center no-repeat;
width: $pt-icon-size-standard;
height: $pt-icon-size-standard;
content: "";
}

&:hover {
Expand Down