Skip to content

Commit

Permalink
update svg fill to use currentcolor so svg defaults to text color, ch…
Browse files Browse the repository at this point in the history
…ange some currentColor to currentcolor
  • Loading branch information
Seth Donohue authored and Seth Donohue committed Jan 5, 2021
1 parent d0d59e6 commit 6dc07e3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
8 changes: 4 additions & 4 deletions packages/web-components/src/flipper/flipper.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const FlipperStyles = css`
align-items: center;
margin: 0;
position: relative;
fill: ${neutralForegroundRestBehavior.var};
fill: currentcolor;
color: ${neutralForegroundRestBehavior.var};
background: transparent;
border: none;
Expand All @@ -47,7 +47,7 @@ export const FlipperStyles = css`
.previous {
position: relative;
${
/* Glyph size and margin-left is temporary -
/* Glyph size and margin-left is temporary -
replace when adaptive typography is figured out */ ''
} width: 16px;
height: 16px;
Expand Down Expand Up @@ -101,7 +101,7 @@ export const FlipperStyles = css`
:host .next,
:host .previous {
color: ${SystemColors.ButtonText};
fill: ${SystemColors.ButtonText};
fill: currentcolor;
}
:host::before {
background: ${SystemColors.Canvas};
Expand All @@ -117,7 +117,7 @@ export const FlipperStyles = css`
:host(:hover) .previous {
forced-color-adjust: none;
color: ${SystemColors.HighlightText};
fill: ${SystemColors.HighlightText};
fill: currentcolor;
}
:host(.disabled) {
opacity: 1;
Expand Down
8 changes: 4 additions & 4 deletions packages/web-components/src/menu-item/menu-item.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const MenuItemStyles = css`
white-space: nowrap;
overflow: hidden;
color: ${neutralForegroundRestBehavior.var};
fill: ${neutralForegroundRestBehavior.var};
fill: currentcolor;
cursor: pointer;
font-family: var(--body-font);
font-size: var(--type-ramp-base-font-size);
Expand Down Expand Up @@ -54,7 +54,7 @@ export const MenuItemStyles = css`
:host(.disabled:hover) .start,
:host(.disabled:hover) .end,
:host(.disabled:hover)::slotted(svg) {
fill: ${neutralForegroundRestBehavior.var};
fill: currentcolor;
}
.content {
Expand Down Expand Up @@ -114,7 +114,7 @@ export const MenuItemStyles = css`
border-color: ${SystemColors.ButtonText};
box-shadow: 0 0 0 calc(var(--focus-outline-width) * 1px) inset ${SystemColors.HighlightText};
color: ${SystemColors.HighlightText};
fill: ${SystemColors.HighlightText};
fill: currentcolor;
}
:host(.disabled),
:host(.disabled:hover),
Expand All @@ -123,7 +123,7 @@ export const MenuItemStyles = css`
:host(.disabled:hover)::slotted(svg) {
background: ${SystemColors.Canvas};
color: ${SystemColors.GrayText};
fill: ${SystemColors.GrayText};
fill: currentcolor;
opacity: 1;
}
`,
Expand Down
18 changes: 9 additions & 9 deletions packages/web-components/src/styles/patterns/button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const BaseButtonStyles: ElementStyles = css`
background-color: ${neutralFillRestBehavior.var};
color: ${neutralForegroundRestBehavior.var};
border-radius: calc(var(--corner-radius) * 1px);
fill: currentColor;
fill: currentcolor;
cursor: pointer;
}
Expand Down Expand Up @@ -125,7 +125,7 @@ export const BaseButtonStyles: ElementStyles = css`
background-color: ${SystemColors.ButtonFace};
border-color: ${SystemColors.ButtonText};
color: ${SystemColors.ButtonText};
fill: currentColor;
fill: currentcolor;
}
:host(:hover) {
Expand Down Expand Up @@ -171,7 +171,7 @@ export const BaseButtonStyles: ElementStyles = css`
border-color: ${SystemColors.LinkText};
box-shadow: 0 0 0 1px ${SystemColors.LinkText} inset;
color: ${SystemColors.LinkText};
fill: currentColor;
fill: currentcolor;
}
`,
),
Expand Down Expand Up @@ -243,7 +243,7 @@ export const AccentButtonStyles = css`
border-color: ${SystemColors.LinkText};
box-shadow: none;
color: ${SystemColors.LinkText};
fill: currentColor;
fill: currentcolor;
}
:host(.accent[href]) .control:${focusVisible} {
Expand Down Expand Up @@ -478,20 +478,20 @@ export const StealthButtonStyles = css`
background-color: none;
border-color: transparent;
color: ${SystemColors.ButtonText};
fill: currentColor;
fill: currentcolor;
}
:host(.stealth:hover) .control {
background-color: ${SystemColors.Highlight};
border-color: ${SystemColors.Highlight};
color: ${SystemColors.HighlightText};
fill: currentColor;
fill: currentcolor;
}
:host(.stealth:${focusVisible}) .control {
box-shadow: 0 0 0 1px ${SystemColors.Highlight};
color: ${SystemColors.HighlightText};
fill: currentColor;
fill: currentcolor;
}
:host(.stealth.disabled) {
Expand All @@ -512,13 +512,13 @@ export const StealthButtonStyles = css`
background-color: ${SystemColors.LinkText};
border-color: ${SystemColors.LinkText};
color: ${SystemColors.HighlightText};
fill: currentColor;
fill: currentcolor;
}
:host(.stealth:${focusVisible}[href]) .control {
box-shadow: 0 0 0 1px ${SystemColors.LinkText};
color: ${SystemColors.LinkText};
fill: currentColor;
fill: currentcolor;
}
`,
),
Expand Down
6 changes: 3 additions & 3 deletions packages/web-components/src/tabs/tab/tab.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,19 @@ export const TabStyles = css`
forced-color-adjust: none;
border-color: transparent;
color: ${SystemColors.ButtonText};
fill: ${SystemColors.ButtonText};
fill: currentcolor;
}
:host(:hover),
:host(.vertical:hover),
:host([aria-selected="true"]:hover) {
background: ${SystemColors.Highlight};
color: ${SystemColors.HighlightText};
fill: ${SystemColors.HighlightText};
fill: currentcolor;
}
:host([aria-selected="true"]) {
background: ${SystemColors.HighlightText};
color: ${SystemColors.Highlight};
fill: ${SystemColors.Highlight};
fill: currentcolor;
}
:host(:${focusVisible}) {
border-color: ${SystemColors.ButtonText};
Expand Down
4 changes: 2 additions & 2 deletions packages/web-components/src/text-field/text-field.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const TextFieldStyles = css`
line-height: var(--type-ramp-base-line-height);
margin-bottom: 4px;
}
.label__hidden {
display: none;
visibility: hidden;
Expand All @@ -74,7 +74,7 @@ export const TextFieldStyles = css`
margin: auto;
fill: currentcolor;
}
::slotted(svg) { ${
/* Glyph size and margin-left is temporary -
replace when adaptive typography is figured out */ ''
Expand Down

0 comments on commit 6dc07e3

Please sign in to comment.