generated from shgysk8zer0/npm-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from AegisJSProject/release/v0.2.0
More custom properties and stylesheets
- Loading branch information
Showing
14 changed files
with
858 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { | ||
colorLight, colorDark, bgLight, bgDark, borderLight, borderDark, btnPrimary, btnPrimaryActive, | ||
btnPrimaryHover, btnDisabled, btnSuccess, btnSuccessActive, btnSuccessHover, btnDanger, btnDangerActive, | ||
btnDangerHover, btnWarning, btnWarningActive, btnWarningHover, | ||
} from './palette/aegis.js'; | ||
|
||
export const customProperties = { | ||
'font': { initialValue: 'system-ui', syntax: '<custom-ident> | <string>' }, | ||
'color-light': { initialValue: colorLight, syntax: '<color>' }, | ||
'color-dark': { initialValue: colorDark, syntax: '<color>' }, | ||
'bg-light': { initialValue: bgLight, syntax: '<color>' }, | ||
'bg-dark': { initialValue: bgDark, syntax: '<color>' }, | ||
'border-color-light': { initialValue: borderLight, syntax: '<color>' }, | ||
'border-color-dark': { initialValue: borderDark, syntax: '<color>' }, | ||
'border-radius': { initialValue: '8px', syntax: '<length>' }, | ||
'btn-primary': { initialValue: btnPrimary, syntax: '<color>' }, | ||
'btn-primary-hover': { initialValue: btnPrimaryHover, syntax: '<color>' }, | ||
'btn-primary-active': { initialValue: btnPrimaryActive, syntax: '<color>' }, | ||
'btn-primary-disabled': { initialValue: btnDisabled, syntax: '<color>' }, | ||
'btn-danger': { initialValue: btnDanger, syntax: '<color>' }, | ||
'btn-danger-hover': { initialValue: btnDangerHover, syntax: '<color>' }, | ||
'btn-danger-active': { initialValue: btnDangerActive, syntax: '<color>' }, | ||
'btn-danger-disabled': { initialValue: btnDisabled, syntax: '<color>' }, | ||
'btn-success': { initialValue: btnSuccess, syntax: '<color>' }, | ||
'btn-success-hover': { initialValue: btnSuccessHover, syntax: '<color>' }, | ||
'btn-success-active': { initialValue: btnSuccessActive, syntax: '<color>' }, | ||
'btn-success-disabled': { initialValue: btnDisabled, syntax: '<color>' }, | ||
'btn-warning': { initialValue: btnWarning, syntax: '<color>' }, | ||
'btn-warning-hover': { initialValue: btnWarningHover, syntax: '<color>' }, | ||
'btn-warning-active': { initialValue: btnWarningActive, syntax: '<color>' }, | ||
'btn-warning-disabled': { initialValue: btnDisabled, syntax: '<color>' }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import { css } from '@aegisjsproject/parsers/css.js'; | ||
|
||
export const forms = css`.form-group { | ||
border: 1px solid transparent; | ||
padding: var(--form-group-padding, 0.4em 0.8em); | ||
margin-bottom: 0.4em; | ||
border-radius: 6px; | ||
transition: border-color 200ms ease-in-out; | ||
} | ||
.form-group:focus-within { | ||
border-color: var(--form-group-border, #cacaca); | ||
} | ||
.form-group .input-label { | ||
display: block; | ||
margin: 0.4em 0; | ||
} | ||
.form-group .input-label.required::after { | ||
content: ' *'; | ||
display: inline; | ||
font-size: 0.8em; | ||
font-weight: 800; | ||
} | ||
.form-group .input, .form-group .input:required:invalid:placeholder-shown { | ||
display: block; | ||
width: var(--input-width, 100%); | ||
max-width: 100%; | ||
color: currentColor; | ||
border-style: solid; | ||
border-color: var(--input-border, #cacaca); | ||
border-width: 0 0 1px 0; | ||
background: transparent; | ||
padding: var(--form-group-padding, 0.5em 0.3em); | ||
transition: color 300ms ease-in-out, background-color 300ms ease-in-out; | ||
} | ||
.form-group textarea.input { | ||
resize: vertical; | ||
} | ||
.form-group .input:invalid { | ||
box-shadow: none; | ||
} | ||
.form-group .input:invalid:not(:focus) { | ||
color: var(--invalid-color, #-871717); | ||
border-color: currentColor; | ||
background-color: var(--invalid-background, #F7C1C1); | ||
} | ||
.form-group input[hidden] + label[for].btn-toggle { | ||
background-color: var(--button-disabled-background); | ||
margin: var(--form-group-margin, 0.3rem); | ||
transition: background-color 300ms ease-in-out; | ||
} | ||
.form-group input[hidden]:checked + label[for].btn-toggle { | ||
background-color: var(--button-background); | ||
} | ||
.form-group input[hidden]:not(:checked) + label[for].btn-toggle .when-checked { | ||
display: none; | ||
} | ||
.form-group input[hidden]:checked + label[for].btn-toggle .when-unchecked { | ||
display: none; | ||
}`; |
Oops, something went wrong.