Skip to content

Commit

Permalink
fix(code-snippet,modal): use transparent color instead of keyword for…
Browse files Browse the repository at this point in the history
… Safari fix (#4859)

* fix(code-snippet): make color tokens transparent for linear-gradient

* docs(code-snippet): add notes to linear-gradient rules

* fix(modal): use transparent color instead of keyword for linear-gradient
  • Loading branch information
jendowns authored and joshblack committed Dec 11, 2019
1 parent 4a4622c commit 4bc3c50
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@
position: absolute;
top: 0;
right: rem(56px);
background-image: linear-gradient(to right, transparent, $ui-01);

// Safari interprets `transparent` differently, so make color token value transparent instead:
background-image: linear-gradient(to right, rgba($ui-01, 0), $ui-01);
}

// Multi Line Snippet
Expand Down Expand Up @@ -136,7 +138,9 @@
position: absolute;
top: 0;
right: 0;
background-image: linear-gradient(to right, transparent, $ui-01);

// Safari interprets `transparent` differently, so make color token value transparent instead:
background-image: linear-gradient(to right, rgba($ui-01, 0), $ui-01);
}

.#{$prefix}--snippet--multi .#{$prefix}--snippet-container pre code {
Expand Down Expand Up @@ -279,7 +283,8 @@
.#{$prefix}--snippet.#{$prefix}--snippet--light.#{$prefix}--snippet--multi
.#{$prefix}--snippet-container
pre::after {
background-image: linear-gradient(to right, transparent, $ui-02);
// Safari interprets `transparent` differently, so make color token value transparent instead:
background-image: linear-gradient(to right, rgba($ui-02, 0), $ui-02);
}

// Skeleton State
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/components/modal/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@
position: absolute;
left: 0;
bottom: $spacing-08;
background-image: linear-gradient(to bottom, transparent, $ui-01);
// Safari interprets `transparent` differently, so make color token value transparent instead:
background-image: linear-gradient(to bottom, rgba($ui-01, 0), $ui-01);
}

.#{$prefix}--modal-content:focus
Expand Down

0 comments on commit 4bc3c50

Please sign in to comment.