Skip to content

Commit

Permalink
Fix rgb color notation (#836)
Browse files Browse the repository at this point in the history
* The slash is for space-separated notation (can’t mix commas and slashes).
* Prefer rgba() for better backwards compatibility.
* Fix split image param name.
* Fix status dot class case.
craigcook authored Nov 16, 2022

Verified

This commit was signed with the committer’s verified signature. The key has expired.
tvdeyen Thomas von Deyen
1 parent 8450a95 commit 887ca08
Showing 13 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion assets/sass/protocol/base/elements/_links.scss
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
}

&:active {
background-color: rgb(0, 0, 0 / 0.05);
background-color: rgba(0, 0, 0, 0.05);
}
}

2 changes: 1 addition & 1 deletion assets/sass/protocol/base/elements/_tables.scss
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
th,
td {
@include bidi(((text-align, left, right),));
border-top: 1px solid rgb(0, 0, 0 / 0.2);
border-top: 1px solid rgba(0, 0, 0, 0.2);
padding: 0.5em 10px;
text-align: left;
}
4 changes: 2 additions & 2 deletions assets/sass/protocol/components/_menu-list.scss
Original file line number Diff line number Diff line change
@@ -15,8 +15,8 @@
}

.mzp-c-menu-list-list {
background-color: #fff;
box-shadow: 0 0 6px 0 rgb(0, 0, 0 / 0.3);
background-color: $color-white;
box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.3);
border-radius: $border-radius-sm;
}

2 changes: 1 addition & 1 deletion assets/sass/protocol/components/_menu.scss
Original file line number Diff line number Diff line change
@@ -267,7 +267,7 @@

@media #{$mq-md} {
border-top: 1px solid $color-marketing-gray-20;
box-shadow: 0 16px 16px -16px rgb(0, 0, 0 / 0.3);
box-shadow: 0 16px 16px -16px rgba(0, 0, 0, 0.3);
left: 0;
padding: $spacing-xl $spacing-xs;
position: absolute;
4 changes: 2 additions & 2 deletions assets/sass/protocol/components/_modal.scss
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ html.mzp-is-noscroll {
.mzp-c-modal {
@include animation(mzp-a-fade-in 300ms ease-in 0ms 1 normal both);
background: $color-black;
background: rgb(0, 0, 0 / 0.85);
background: rgba(0, 0, 0, 0.85);
bottom: 0;
height: 101%;
left: 0;
@@ -51,7 +51,7 @@ html.mzp-is-noscroll {

.mzp-c-modal-inner {
@include clearfix;
background: rgb(0, 0, 0 / 0.9);
background: rgba(0, 0, 0, 0.9);
max-width: 1200px;
padding: $spacing-xl;
position: relative;
2 changes: 1 addition & 1 deletion assets/sass/protocol/components/_navigation.scss
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@

&.mzp-is-scrolling {
// Shadow colors are equivalent to $color-ink-90, $color-blue-90, $color-ink-90
box-shadow: 0 0 6px 1px rgb(29, 17, 51 / 0.04), 0 0 8px 2px rgb(9, 32, 77 / 0.12), 0 0 5px -3px rgb(29, 17, 51 / 0.12);
box-shadow: 0 0 6px 1px rgba(29, 17, 51, 0.04), 0 0 8px 2px rgba(9, 32, 77, 0.12), 0 0 5px -3px rgba(29, 17, 51, 0.12);
}

&.mzp-is-hidden {
2 changes: 1 addition & 1 deletion assets/sass/protocol/components/_sidebar-menu.scss
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@
&:hover,
&:focus,
&:active {
background-color: rgb(0, 0, 0 / 0.05);
background-color: rgba(0, 0, 0, 0.05);
text-decoration: underline;
}
}
8 changes: 4 additions & 4 deletions components/split/split.config.yml
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ variants:
media can overflow if the container is tall, causing part of the image to
be hidden, so choose wisely.
context:
img_src: '/img/image-1-1.jpg'
image: '/img/image-1-1.jpg'
media_class: mzp-l-split-media-constrain-height
- name: Pop-out Media
notes: |
@@ -105,7 +105,7 @@ variants:
context:
block_class: mzp-l-split-pop
background_class: mzp-t-background-tertiary
img_src: '/img/image-1-1.jpg'
image: '/img/image-1-1.jpg'
- name: Body Alignment
notes: |
Align the body in different positions, horizontally and vertically (it’s
@@ -125,7 +125,7 @@ variants:
than the media height.
context:
body_class: mzp-l-split-h-end mzp-l-split-v-end
img_src: '/img/image-portrait.jpg'
image: '/img/image-portrait.jpg'
- name: Media Alignment
notes: |
Align the media in different positions, horizontally and vertically (it’s
@@ -146,4 +146,4 @@ variants:
than the body height. Taller images will scale to fit.
context:
media_class: mzp-l-split-h-end mzp-l-split-v-end
img_src: '/img/image-1-1-sm.jpg'
image: '/img/image-1-1-sm.jpg'
4 changes: 2 additions & 2 deletions docs/03-contributing/03-css-guide.md
Original file line number Diff line number Diff line change
@@ -107,12 +107,12 @@ declaration above it.
// This is a comment
background: #333 url('img/icon.png') center no-repeat;
color: #bada55;
margin: 0 auto .75em;
margin: 0 auto 0.75em;
}

.selector-a,
.selector-b {
background: rgba(255, 255, 255, .25);
background: rgba(255, 255, 255, 0.25);
padding: 20px;
}
```
6 changes: 3 additions & 3 deletions theme/assets/sass/components/_browser.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* stylelint-disable selector-class-pattern */
.Browser-tabs {
background-color: white;
border-bottom: 1px solid rgb(70, 81, 94 / 0.25);
border-bottom: 1px solid rgba(70, 81, 94, 0.25);
}

.Browser-tab {
a:hover {
background: #f1f1f1;
border-bottom: 2px solid rgb(70, 81, 94 / 0.25);
border-bottom: 2px solid rgba(70, 81, 94, 0.25);
}

a:focus {
@@ -26,7 +26,7 @@
background-color: #f8f8f8;
border-radius: $border-radius-xs;
color: #000080;
outline: 1px solid rgb(0, 0, 0 / 0.05);
outline: 1px solid rgba(0, 0, 0, 0.05);
padding: 0 0.5ch;
}
}
4 changes: 2 additions & 2 deletions theme/assets/sass/components/_prose.scss
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
}

&:active {
background-color: rgb(0, 0, 0 / 0.05);
background-color: rgba(0, 0, 0, 0.05);
}
}

@@ -71,7 +71,7 @@
background-color: #f8f8f8;
border-radius: $border-radius-xs;
color: #000080;
outline: 1px solid rgb(0, 0, 0 / 0.05);
outline: 1px solid rgba(0, 0, 0, 0.05);
padding: 0 0.5ch;
}
}
5 changes: 3 additions & 2 deletions theme/assets/sass/components/_status.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.status-dot {
/* stylelint-disable selector-class-pattern */
.Status-dot {
width: 3px;
height: 3px;
border-width: 3px;
}

.status-label {
.Status-label {
font-weight: bold;
}
2 changes: 1 addition & 1 deletion theme/assets/sass/components/_tokens.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.docs-token-border {
background: gray;
border: 1px solid rgb(0, 0, 0 / 0.1);
border: 1px solid rgba(0, 0, 0, 0.1);
height: 3rem;
margin: 0.5rem 0;
width: 100%;

0 comments on commit 887ca08

Please sign in to comment.