Move the CSS into a path-versioned location
This commit is contained in:
parent
1558468526
commit
1c372415f4
2 changed files with 20 additions and 6 deletions
|
|
@ -66,7 +66,7 @@ export class DotDungeonIncrementer extends HTMLElement {
|
||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
if (!DotDungeonIncrementer.styles) {
|
if (!DotDungeonIncrementer.styles) {
|
||||||
fetch(`./systems/dotdungeon/.styles/components/incrementer.css`)
|
fetch(`./systems/dotdungeon/.styles/v3/components/incrementer.css`)
|
||||||
.then(r => r.text())
|
.then(r => r.text())
|
||||||
.then(t => {
|
.then(t => {
|
||||||
DotDungeonIncrementer.styles = t;
|
DotDungeonIncrementer.styles = t;
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ Disclaimer: This CSS is used by a custom web component and is scoped to JUST
|
||||||
the corresponding web component. Importing this into other files is forbidden.
|
the corresponding web component. Importing this into other files is forbidden.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@use "../mixins/material";
|
||||||
|
|
||||||
$default-border-radius: 4px;
|
$default-border-radius: 4px;
|
||||||
$default-height: 1.25rem;
|
$default-height: 1.25rem;
|
||||||
|
|
||||||
|
|
@ -12,11 +14,26 @@ div {
|
||||||
// I dunno why this is needed for the height to not be calculated as 17px,
|
// I dunno why this is needed for the height to not be calculated as 17px,
|
||||||
// but it is for some arcane reason
|
// but it is for some arcane reason
|
||||||
grid-template-rows: var(--height, $default-height);
|
grid-template-rows: var(--height, $default-height);
|
||||||
|
border-radius: var(--border-radius, $default-border-radius);
|
||||||
|
@include material.elevate(2);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
@include material.elevate(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus-within {
|
||||||
|
@include material.elevate(6);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
button, input {
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
background: none;
|
||||||
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
@ -30,14 +47,11 @@ input {
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
aspect-ratio: 1 / 1;
|
aspect-ratio: 1 / 1;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: color-mix(in lab, white 5%, transparent);
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue