feat: demo style tweaks

This commit is contained in:
Sam Potts
2023-03-18 23:52:09 +11:00
parent 8da1a78342
commit ae59c117b5
10 changed files with 66 additions and 70 deletions
+25 -20
View File
@@ -7,8 +7,7 @@
.button__count {
align-items: center;
border: 0;
border-radius: $border-radius-base;
box-shadow: 0 1px 1px rgba(#000, 0.1);
border-radius: $border-radius-medium;
display: inline-flex;
padding: ($spacing-base * 0.75);
position: relative;
@@ -19,27 +18,34 @@
// Buttons
.button {
background: $color-button-background;
--shadow-color: 0deg 0% 20%;
align-items: center;
background-color: $color-button-background;
background-image: linear-gradient(0deg, transparent, rgba(255, 255, 255, 0.05));
border: 1px solid darken($color-button-background, 5);
box-shadow: 0 0.8px 1px hsl(var(--shadow-color) / 0.05), 0 1.3px 1.6px -1px hsl(var(--shadow-color) / 0.06),
0 2.8px 3.4px -2px hsl(var(--shadow-color) / 0.07);
color: $color-button-text;
display: inline-flex;
font-weight: $font-weight-bold;
gap: 0.25rem;
padding-left: ($spacing-base * 1.25);
padding-right: ($spacing-base * 1.25);
text-decoration: none;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
transition: all 0.2s ease;
&:hover,
&:focus {
background: $color-button-background-hover;
border-color: darken($color-button-background, 7);
// Remove the underline/border
&::after {
display: none;
display: none !important;
}
}
&:hover {
box-shadow: 0 2px 2px rgba(#000, 0.1);
}
&:focus {
outline: 0;
}
@@ -49,15 +55,12 @@
}
&:active {
box-shadow: none;
top: 1px;
}
}
// Button group
.button--with-count {
display: inline-flex;
.button .icon {
.icon {
filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
flex-shrink: 0;
}
}
@@ -66,19 +69,21 @@
.button__count {
animation: fade-in 0.2s ease;
background: $color-button-count-background;
border: 1px solid $color-gray-100;
color: $color-button-count-text;
margin-left: ($spacing-base * 0.75);
&::before {
border: $arrow-size solid transparent;
border-left-width: 0;
border-right-color: $color-button-count-background;
background-color: $color-button-count-background;
border: inherit;
border-width: 0 0 1px 1px;
content: '';
height: 0;
display: block;
height: 8px;
position: absolute;
right: 100%;
top: 50%;
transform: translateY(-50%);
width: 0;
transform: translateY(-50%) translateX(50%) translateX(-1px) rotate(45deg);
width: 8px;
}
}
+3 -9
View File
@@ -2,15 +2,9 @@
// Links
// ==========================================================================
// Make a <button> look like an <a>
button.faux-link {
@extend a; // stylelint-disable-line
@include cancel-button-styles;
}
// Links
a {
border-bottom: 1px dotted currentColor;
.link {
align-items: center;
border-bottom: 1px dashed currentColor;
color: $color-link;
position: relative;
text-decoration: none;
+5 -2
View File
@@ -6,8 +6,10 @@
// Example players
.plyr {
border-radius: $border-radius-large;
box-shadow: 0 2px 15px rgba(#000, 0.1);
--shadow-color: 197deg 32% 65%;
border-radius: $border-radius-2x-large;
box-shadow: 0 0.5px 0.6px hsl(var(--shadow-color) / 0.36), 0 1.7px 1.9px -0.8px hsl(var(--shadow-color) / 0.36),
0 4.3px 4.8px -1.7px hsl(var(--shadow-color) / 0.36), -0.1px 10.6px 11.9px -2.5px hsl(var(--shadow-color) / 0.36);
margin: $spacing-base auto;
&.plyr--audio {
@@ -17,6 +19,7 @@
.plyr__video-wrapper::after {
border: 1px solid rgba(#000, 0.15);
border-bottom-color: rgba(#000, 0.25);
border-radius: inherit;
bottom: 0;
content: '';
+1
View File
@@ -37,6 +37,7 @@ main {
aside {
align-items: center;
background: #fff;
box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05);
display: flex;
flex-shrink: 0;
justify-content: center;
-19
View File
@@ -4,25 +4,6 @@
@use 'sass:math';
// Convert a <button> into an <a>
// ---------------------------------------
@mixin cancel-button-styles() {
background: transparent;
border: 0;
border-radius: 0;
cursor: pointer;
font: inherit;
line-height: $line-height-base;
margin: 0;
padding: 0;
position: relative;
text-align: inherit;
text-shadow: inherit;
user-select: text;
vertical-align: baseline;
width: auto;
}
// Nicer focus styles
// ---------------------------------------
@mixin focus-visible($color: $focus-default-color) {
+4
View File
@@ -9,3 +9,7 @@
*::before {
box-sizing: border-box;
}
button {
all: unset;
}
+3 -2
View File
@@ -6,8 +6,9 @@
$arrow-size: 5px;
// Radii
$border-radius-base: 4px;
$border-radius-large: 8px;
$border-radius-small: 4px;
$border-radius-medium: 6px;
$border-radius-2x-large: 12px;
// Background
$page-background: linear-gradient(to left top, $color-background-from, $color-background-to);