mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-20 17:03:42 +00:00
keyboard stuff, styling things
This commit is contained in:
35
src/lib/style/_kbd.scss
Normal file
35
src/lib/style/_kbd.scss
Normal file
@@ -0,0 +1,35 @@
|
||||
kbd {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
height: 20px;
|
||||
margin-block: 6px;
|
||||
padding: 4px;
|
||||
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
color: currentcolor;
|
||||
|
||||
border: 1px solid currentcolor;
|
||||
border-radius: 4px;
|
||||
|
||||
&.icon {
|
||||
padding: 2px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
&:has(> kbd) {
|
||||
gap: 4px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
> kbd {
|
||||
padding: 2px;
|
||||
|
||||
&.icon {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
69
src/lib/style/form/_button.scss
Normal file
69
src/lib/style/form/_button.scss
Normal file
@@ -0,0 +1,69 @@
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a,
|
||||
label:has(input),
|
||||
button {
|
||||
cursor: pointer;
|
||||
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
width: max-content;
|
||||
height: 48px;
|
||||
padding-block: 8px;
|
||||
padding-inline: 16px;
|
||||
|
||||
font-family: inherit;
|
||||
font-weight: 600;
|
||||
color: currentcolor;
|
||||
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 32px;
|
||||
|
||||
transition: all 250ms ease;
|
||||
|
||||
&.icon {
|
||||
aspect-ratio: 1;
|
||||
padding-block: 0;
|
||||
padding-inline: 0;
|
||||
|
||||
font-size: 24px;
|
||||
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
&.primary {
|
||||
color: var(--md-sys-color-on-primary);
|
||||
background: var(--md-sys-color-primary);
|
||||
}
|
||||
}
|
||||
|
||||
label:has(input):hover,
|
||||
.button:hover:not(:active),
|
||||
a:hover:not(:active),
|
||||
button:hover:not(:active) {
|
||||
filter: brightness(70%);
|
||||
transition: filter 250ms ease;
|
||||
|
||||
&:has(:checked),
|
||||
&.active {
|
||||
filter: brightness(120%);
|
||||
}
|
||||
|
||||
&:disabled,
|
||||
&.disabled {
|
||||
opacity: 0.5;
|
||||
filter: none;
|
||||
}
|
||||
}
|
||||
|
||||
.disabled,
|
||||
:disabled {
|
||||
pointer-events: none;
|
||||
opacity: 0.5;
|
||||
}
|
||||
8
src/lib/style/theme.scss
Normal file
8
src/lib/style/theme.scss
Normal file
@@ -0,0 +1,8 @@
|
||||
@import "./form/button";
|
||||
@import "./form/toggle";
|
||||
@import "./kbd";
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
appearance: none;
|
||||
}
|
||||
@@ -24,6 +24,13 @@ $padding: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.tippy-box[data-theme~="tooltip"] {
|
||||
color: var(--md-sys-color-on-background);
|
||||
background-color: var(--md-sys-color-background);
|
||||
border: 1px solid var(--md-sys-color-outline);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.tippy-box[data-theme~="search-completion"] {
|
||||
overflow: hidden;
|
||||
filter: none;
|
||||
|
||||
Reference in New Issue
Block a user