Scss files organization

+ Slim version example
This commit is contained in:
Lucas 2019-12-02 11:52:26 +07:00
parent f8e51cb875
commit 434cbe02ac
28 changed files with 1329 additions and 300 deletions

View file

@ -3,8 +3,7 @@
* Copyright 2019 - Licensed under MIT * Copyright 2019 - Licensed under MIT
*/ */
/** /**
* Light theme (Default) * Theme: default
* Can be forced with data-theme="light"
*/ */
[data-theme="light"], [data-theme="light"],
:root:not([data-theme="dark"]) { :root:not([data-theme="dark"]) {
@ -20,6 +19,15 @@
--primary-hover: #08769b; --primary-hover: #08769b;
--primary-focus: rgba(16, 149, 193, 0.125); --primary-focus: rgba(16, 149, 193, 0.125);
--primary-inverse: #FFF; --primary-inverse: #FFF;
--secondary: #73828c;
--secondary-hover: #415462;
--secondary-focus: rgba(115, 130, 140, 0.125);
--secondary-inverse: #FFF;
--contrast: #2c3d49;
--contrast-hover: #0d1419;
--contrast-focus: rgba(115, 130, 140, 0.125);
--contrast-border: rgba(255, 223, 128, 0.5);
--contrast-inverse: #FFF;
--input-background: #FFF; --input-background: #FFF;
--input-border: #c8d1d8; --input-border: #c8d1d8;
--valid: #288a6a; --valid: #288a6a;
@ -34,18 +42,15 @@
--card-shadow: 0 0.125rem 1rem rgba(27, 40, 50, 0.04), 0 0.125rem 2rem rgba(27, 40, 50, 0.08), 0 0 0 0.0625rem rgba(27, 40, 50, 0.024); --card-shadow: 0 0.125rem 1rem rgba(27, 40, 50, 0.04), 0 0.125rem 2rem rgba(27, 40, 50, 0.08), 0 0 0 0.0625rem rgba(27, 40, 50, 0.024);
--code-background: #f3f5f7; --code-background: #f3f5f7;
--code-inlined: #edf0f3; --code-inlined: #edf0f3;
--code-color-2: #a65980; --code-color-1: #73828c;
--code-color-3: #478085; --code-color-2: #b34d80;
--code-color-3: #3d888f;
--code-color-4: #998866; --code-color-4: #998866;
--code-color-5: #96a4ae; --code-color-5: #96a4ae;
--table-border: rgba(237, 240, 243, 0.75); --table-border: rgba(237, 240, 243, 0.75);
--table-stripping: rgba(27, 40, 50, 0.02); --table-stripping: rgba(27, 40, 50, 0.02);
} }
/**
* Dark theme (Auto)
* Automatically enabled if user has Dark mode enabled
*/
@media only screen and (prefers-color-scheme: dark) { @media only screen and (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) { :root:not([data-theme="light"]) {
--background: #10181e; --background: #10181e;
@ -60,6 +65,15 @@
--primary-hover: #1ab3e6; --primary-hover: #1ab3e6;
--primary-focus: rgba(16, 149, 193, 0.25); --primary-focus: rgba(16, 149, 193, 0.25);
--primary-inverse: #FFF; --primary-inverse: #FFF;
--secondary: #596b78;
--secondary-hover: #73828c;
--secondary-focus: rgba(89, 107, 120, 0.25);
--secondary-inverse: #FFF;
--contrast: #d5dce2;
--contrast-hover: #FFF;
--contrast-focus: rgba(89, 107, 120, 0.25);
--contrast-border: rgba(255, 223, 128, 0.33);
--contrast-inverse: #10181e;
--input-background: #10181e; --input-background: #10181e;
--input-border: #374956; --input-border: #374956;
--valid: #1f7a5c; --valid: #1f7a5c;
@ -84,10 +98,6 @@
} }
} }
/**
* Dark theme (Forced)
* Enabled if forced with data-theme="dark"
*/
[data-theme="dark"] { [data-theme="dark"] {
--background: #10181e; --background: #10181e;
--text: #a2afb9; --text: #a2afb9;
@ -101,6 +111,15 @@
--primary-hover: #1ab3e6; --primary-hover: #1ab3e6;
--primary-focus: rgba(16, 149, 193, 0.25); --primary-focus: rgba(16, 149, 193, 0.25);
--primary-inverse: #FFF; --primary-inverse: #FFF;
--secondary: #596b78;
--secondary-hover: #73828c;
--secondary-focus: rgba(89, 107, 120, 0.25);
--secondary-inverse: #FFF;
--contrast: #d5dce2;
--contrast-hover: #FFF;
--contrast-focus: rgba(89, 107, 120, 0.25);
--contrast-border: rgba(255, 223, 128, 0.33);
--contrast-inverse: #10181e;
--input-background: #10181e; --input-background: #10181e;
--input-border: #374956; --input-border: #374956;
--valid: #1f7a5c; --valid: #1f7a5c;
@ -732,6 +751,24 @@ select:not([multiple]) {
background-size: 1rem auto; background-size: 1rem auto;
} }
form small {
color: var(--muted-text);
}
input + small {
margin-top: -1rem;
margin-bottom: 1.5rem;
}
label > input:not([type="checkbox"]):not([type="radio"]),
label > select,
label > textarea {
margin-top: 0.125rem;
}
/**
* Form elements
*/
[type="checkbox"], [type="checkbox"],
[type="radio"] { [type="radio"] {
display: inline-block; display: inline-block;
@ -807,21 +844,6 @@ select:not([multiple]) {
margin-left: calc(0.925rem - 2px); margin-left: calc(0.925rem - 2px);
} }
form small {
color: var(--muted-text);
}
input + small {
margin-top: -1rem;
margin-bottom: 1.5rem;
}
label > input:not([type="checkbox"]):not([type="radio"]),
label > select,
label > textarea {
margin-top: 0.125rem;
}
/** /**
* Button * Button
*/ */
@ -932,7 +954,6 @@ td {
th, th,
thead td { thead td {
color: var(--text); color: var(--text);
font-weight: bolder;
font-size: 1rem; font-size: 1rem;
} }
@ -1186,7 +1207,7 @@ article > *:not(footer):not(pre):last-child {
} }
/** /**
* Card sectionning (<article> > header, footer|pre) * Card sectionning (<article> > header, footer, pre)
*/ */
article > header, article > header,
article > footer { article > footer {

File diff suppressed because one or more lines are too long

View file

@ -3,8 +3,7 @@
* Copyright 2019 - Licensed under MIT * Copyright 2019 - Licensed under MIT
*/ */
/** /**
* Light theme (Default) * Theme: default
* Can be forced with data-theme="light"
*/ */
[data-theme="light"], [data-theme="light"],
:root:not([data-theme="dark"]) { :root:not([data-theme="dark"]) {
@ -43,18 +42,15 @@
--card-shadow: 0 0.125rem 1rem rgba(27, 40, 50, 0.04), 0 0.125rem 2rem rgba(27, 40, 50, 0.08), 0 0 0 0.0625rem rgba(27, 40, 50, 0.024); --card-shadow: 0 0.125rem 1rem rgba(27, 40, 50, 0.04), 0 0.125rem 2rem rgba(27, 40, 50, 0.08), 0 0 0 0.0625rem rgba(27, 40, 50, 0.024);
--code-background: #f3f5f7; --code-background: #f3f5f7;
--code-inlined: #edf0f3; --code-inlined: #edf0f3;
--code-color-2: #a65980; --code-color-1: #73828c;
--code-color-3: #478085; --code-color-2: #b34d80;
--code-color-3: #3d888f;
--code-color-4: #998866; --code-color-4: #998866;
--code-color-5: #96a4ae; --code-color-5: #96a4ae;
--table-border: rgba(237, 240, 243, 0.75); --table-border: rgba(237, 240, 243, 0.75);
--table-stripping: rgba(27, 40, 50, 0.02); --table-stripping: rgba(27, 40, 50, 0.02);
} }
/**
* Dark theme (Auto)
* Automatically enabled if user has Dark mode enabled
*/
@media only screen and (prefers-color-scheme: dark) { @media only screen and (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) { :root:not([data-theme="light"]) {
--background: #10181e; --background: #10181e;
@ -102,10 +98,6 @@
} }
} }
/**
* Dark theme (Forced)
* Enabled if forced with data-theme="dark"
*/
[data-theme="dark"] { [data-theme="dark"] {
--background: #10181e; --background: #10181e;
--text: #a2afb9; --text: #a2afb9;
@ -840,6 +832,24 @@ select:not([multiple]) {
background-size: 1rem auto; background-size: 1rem auto;
} }
form small {
color: var(--muted-text);
}
input + small {
margin-top: -1rem;
margin-bottom: 1.5rem;
}
label > input:not([type="checkbox"]):not([type="radio"]),
label > select,
label > textarea {
margin-top: 0.125rem;
}
/**
* Form elements
*/
[type="checkbox"], [type="checkbox"],
[type="radio"] { [type="radio"] {
display: inline-block; display: inline-block;
@ -915,21 +925,6 @@ select:not([multiple]) {
margin-left: calc(0.925rem - 2px); margin-left: calc(0.925rem - 2px);
} }
form small {
color: var(--muted-text);
}
input + small {
margin-top: -1rem;
margin-bottom: 1.5rem;
}
label > input:not([type="checkbox"]):not([type="radio"]),
label > select,
label > textarea {
margin-top: 0.125rem;
}
/** /**
* Button * Button
*/ */
@ -1182,7 +1177,6 @@ td {
th, th,
thead td { thead td {
color: var(--text); color: var(--text);
font-weight: bolder;
font-size: 1rem; font-size: 1rem;
} }
@ -1436,7 +1430,7 @@ article > *:not(footer):not(pre):last-child {
} }
/** /**
* Card sectionning (<article> > header, footer|pre) * Card sectionning (<article> > header, footer, pre)
*/ */
article > header, article > header,
article > footer { article > footer {

View file

@ -3,8 +3,7 @@
* Copyright 2019 - Licensed under MIT * Copyright 2019 - Licensed under MIT
*/ */
/** /**
* Light theme (Default) * Theme: default
* Can be forced with data-theme="light"
*/ */
[data-theme="light"], [data-theme="light"],
:root:not([data-theme="dark"]) { :root:not([data-theme="dark"]) {
@ -20,6 +19,15 @@
--primary-hover: #08769b; --primary-hover: #08769b;
--primary-focus: rgba(16, 149, 193, 0.125); --primary-focus: rgba(16, 149, 193, 0.125);
--primary-inverse: #FFF; --primary-inverse: #FFF;
--secondary: #73828c;
--secondary-hover: #415462;
--secondary-focus: rgba(115, 130, 140, 0.125);
--secondary-inverse: #FFF;
--contrast: #2c3d49;
--contrast-hover: #0d1419;
--contrast-focus: rgba(115, 130, 140, 0.125);
--contrast-border: rgba(255, 223, 128, 0.5);
--contrast-inverse: #FFF;
--input-background: #FFF; --input-background: #FFF;
--input-border: #c8d1d8; --input-border: #c8d1d8;
--valid: #288a6a; --valid: #288a6a;
@ -34,18 +42,15 @@
--card-shadow: 0 0.125rem 1rem rgba(27, 40, 50, 0.04), 0 0.125rem 2rem rgba(27, 40, 50, 0.08), 0 0 0 0.0625rem rgba(27, 40, 50, 0.024); --card-shadow: 0 0.125rem 1rem rgba(27, 40, 50, 0.04), 0 0.125rem 2rem rgba(27, 40, 50, 0.08), 0 0 0 0.0625rem rgba(27, 40, 50, 0.024);
--code-background: #f3f5f7; --code-background: #f3f5f7;
--code-inlined: #edf0f3; --code-inlined: #edf0f3;
--code-color-2: #a65980; --code-color-1: #73828c;
--code-color-3: #478085; --code-color-2: #b34d80;
--code-color-3: #3d888f;
--code-color-4: #998866; --code-color-4: #998866;
--code-color-5: #96a4ae; --code-color-5: #96a4ae;
--table-border: rgba(237, 240, 243, 0.75); --table-border: rgba(237, 240, 243, 0.75);
--table-stripping: rgba(27, 40, 50, 0.02); --table-stripping: rgba(27, 40, 50, 0.02);
} }
/**
* Dark theme (Auto)
* Automatically enabled if user has Dark mode enabled
*/
@media only screen and (prefers-color-scheme: dark) { @media only screen and (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) { :root:not([data-theme="light"]) {
--background: #10181e; --background: #10181e;
@ -60,6 +65,15 @@
--primary-hover: #1ab3e6; --primary-hover: #1ab3e6;
--primary-focus: rgba(16, 149, 193, 0.25); --primary-focus: rgba(16, 149, 193, 0.25);
--primary-inverse: #FFF; --primary-inverse: #FFF;
--secondary: #596b78;
--secondary-hover: #73828c;
--secondary-focus: rgba(89, 107, 120, 0.25);
--secondary-inverse: #FFF;
--contrast: #d5dce2;
--contrast-hover: #FFF;
--contrast-focus: rgba(89, 107, 120, 0.25);
--contrast-border: rgba(255, 223, 128, 0.33);
--contrast-inverse: #10181e;
--input-background: #10181e; --input-background: #10181e;
--input-border: #374956; --input-border: #374956;
--valid: #1f7a5c; --valid: #1f7a5c;
@ -84,10 +98,6 @@
} }
} }
/**
* Dark theme (Forced)
* Enabled if forced with data-theme="dark"
*/
[data-theme="dark"] { [data-theme="dark"] {
--background: #10181e; --background: #10181e;
--text: #a2afb9; --text: #a2afb9;
@ -101,6 +111,15 @@
--primary-hover: #1ab3e6; --primary-hover: #1ab3e6;
--primary-focus: rgba(16, 149, 193, 0.25); --primary-focus: rgba(16, 149, 193, 0.25);
--primary-inverse: #FFF; --primary-inverse: #FFF;
--secondary: #596b78;
--secondary-hover: #73828c;
--secondary-focus: rgba(89, 107, 120, 0.25);
--secondary-inverse: #FFF;
--contrast: #d5dce2;
--contrast-hover: #FFF;
--contrast-focus: rgba(89, 107, 120, 0.25);
--contrast-border: rgba(255, 223, 128, 0.33);
--contrast-inverse: #10181e;
--input-background: #10181e; --input-background: #10181e;
--input-border: #374956; --input-border: #374956;
--valid: #1f7a5c; --valid: #1f7a5c;
@ -728,6 +747,24 @@ select:not([multiple]) {
background-size: 1rem auto; background-size: 1rem auto;
} }
form small {
color: var(--muted-text);
}
input + small {
margin-top: -1rem;
margin-bottom: 1.5rem;
}
label > input:not([type="checkbox"]):not([type="radio"]),
label > select,
label > textarea {
margin-top: 0.125rem;
}
/**
* Form elements
*/
[type="checkbox"], [type="checkbox"],
[type="radio"] { [type="radio"] {
display: inline-block; display: inline-block;
@ -803,21 +840,6 @@ select:not([multiple]) {
margin-left: calc(0.925rem - 2px); margin-left: calc(0.925rem - 2px);
} }
form small {
color: var(--muted-text);
}
input + small {
margin-top: -1rem;
margin-bottom: 1.5rem;
}
label > input:not([type="checkbox"]):not([type="radio"]),
label > select,
label > textarea {
margin-top: 0.125rem;
}
/** /**
* Button * Button
*/ */
@ -928,7 +950,6 @@ td {
th, th,
thead td { thead td {
color: var(--text); color: var(--text);
font-weight: bolder;
font-size: 1rem; font-size: 1rem;
} }
@ -1182,7 +1203,7 @@ article > *:not(footer):not(pre):last-child {
} }
/** /**
* Card sectionning (<article> > header, footer|pre) * Card sectionning (<article> > header, footer, pre)
*/ */
article > header, article > header,
article > footer { article > footer {

File diff suppressed because one or more lines are too long

2
css/pico.min.css vendored

File diff suppressed because one or more lines are too long

962
css/pico.slim.css Normal file
View file

@ -0,0 +1,962 @@
/*!
* Pico.css v0.1.0 (https://picocss.com)
* Copyright 2019 - Licensed under MIT
*
* Slim version example
* You can export only the modules you need
*/
/**
* Theme: default
*/
[data-theme="light"],
:root:not([data-theme="dark"]) {
--background: #FFF;
--text: #415462;
--h1: #1b2832;
--h2: #2c3d49;
--h3: #415462;
--h4: #596b78;
--h5: #73828c;
--h6: #8a99a3;
--primary: #1095c1;
--primary-hover: #08769b;
--primary-focus: rgba(16, 149, 193, 0.125);
--primary-inverse: #FFF;
--secondary: #73828c;
--secondary-hover: #415462;
--secondary-focus: rgba(115, 130, 140, 0.125);
--secondary-inverse: #FFF;
--contrast: #2c3d49;
--contrast-hover: #0d1419;
--contrast-focus: rgba(115, 130, 140, 0.125);
--contrast-border: rgba(255, 223, 128, 0.5);
--contrast-inverse: #FFF;
--input-background: #FFF;
--input-border: #c8d1d8;
--valid: #288a6a;
--invalid: #b94646;
--mark: rgba(255, 223, 128, 0.5);
--mark-text: #2c3d49;
--muted-text: #7e8d98;
--muted-background: #edf0f3;
--muted-border: #edf0f3;
--card-background: #FFF;
--card-sections: #f3f5f7;
--card-shadow: 0 0.125rem 1rem rgba(27, 40, 50, 0.04), 0 0.125rem 2rem rgba(27, 40, 50, 0.08), 0 0 0 0.0625rem rgba(27, 40, 50, 0.024);
--code-background: #f3f5f7;
--code-inlined: #edf0f3;
--code-color-1: #73828c;
--code-color-2: #b34d80;
--code-color-3: #3d888f;
--code-color-4: #998866;
--code-color-5: #96a4ae;
--table-border: rgba(237, 240, 243, 0.75);
--table-stripping: rgba(27, 40, 50, 0.02);
}
@media only screen and (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--background: #10181e;
--text: #a2afb9;
--h1: #edf0f3;
--h2: #d5dce2;
--h3: #bbc6ce;
--h4: #a2afb9;
--h5: #8a99a3;
--h6: #73828c;
--primary: #1095c1;
--primary-hover: #1ab3e6;
--primary-focus: rgba(16, 149, 193, 0.25);
--primary-inverse: #FFF;
--secondary: #596b78;
--secondary-hover: #73828c;
--secondary-focus: rgba(89, 107, 120, 0.25);
--secondary-inverse: #FFF;
--contrast: #d5dce2;
--contrast-hover: #FFF;
--contrast-focus: rgba(89, 107, 120, 0.25);
--contrast-border: rgba(255, 223, 128, 0.33);
--contrast-inverse: #10181e;
--input-background: #10181e;
--input-border: #374956;
--valid: #1f7a5c;
--invalid: #943838;
--mark: rgba(255, 223, 128, 0.5);
--mark-text: #FFF;
--muted-text: #73828c;
--muted-background: #10181e;
--muted-border: #23333e;
--card-background: #17232b;
--card-sections: #141d24;
--card-shadow: 0 0.125rem 1rem rgba(0, 0, 0, 0.06), 0 0.125rem 2rem rgba(0, 0, 0, 0.12), 0 0 0 0.0625rem rgba(0, 0, 0, 0.09);
--code-background: #141d24;
--code-inlined: rgba(65, 84, 98, 0.25);
--code-color-1: #73828c;
--code-color-2: #a65980;
--code-color-3: #599fa6;
--code-color-4: #8c8473;
--code-color-5: #4d606d;
--table-border: #10181e;
--table-stripping: rgba(237, 240, 243, 0.02);
}
}
[data-theme="dark"] {
--background: #10181e;
--text: #a2afb9;
--h1: #edf0f3;
--h2: #d5dce2;
--h3: #bbc6ce;
--h4: #a2afb9;
--h5: #8a99a3;
--h6: #73828c;
--primary: #1095c1;
--primary-hover: #1ab3e6;
--primary-focus: rgba(16, 149, 193, 0.25);
--primary-inverse: #FFF;
--secondary: #596b78;
--secondary-hover: #73828c;
--secondary-focus: rgba(89, 107, 120, 0.25);
--secondary-inverse: #FFF;
--contrast: #d5dce2;
--contrast-hover: #FFF;
--contrast-focus: rgba(89, 107, 120, 0.25);
--contrast-border: rgba(255, 223, 128, 0.33);
--contrast-inverse: #10181e;
--input-background: #10181e;
--input-border: #374956;
--valid: #1f7a5c;
--invalid: #943838;
--mark: rgba(255, 223, 128, 0.5);
--mark-text: #FFF;
--muted-text: #73828c;
--muted-background: #10181e;
--muted-border: #23333e;
--card-background: #17232b;
--card-sections: #141d24;
--card-shadow: 0 0.125rem 1rem rgba(0, 0, 0, 0.06), 0 0.125rem 2rem rgba(0, 0, 0, 0.12), 0 0 0 0.0625rem rgba(0, 0, 0, 0.09);
--code-background: #141d24;
--code-inlined: rgba(65, 84, 98, 0.25);
--code-color-1: #73828c;
--code-color-2: #a65980;
--code-color-3: #599fa6;
--code-color-4: #8c8473;
--code-color-5: #4d606d;
--table-border: #10181e;
--table-stripping: rgba(237, 240, 243, 0.02);
}
/**
* Document
* Content-box & Responsive typography
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
background: var(--background);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 16px;
font-weight: 400;
line-height: 1.5;
text-rendering: optimizeLegibility;
}
@media (min-width: 576px) {
html {
font-size: 17px;
}
}
@media (min-width: 768px) {
html {
font-size: 18px;
}
}
@media (min-width: 992px) {
html {
font-size: 19px;
}
}
@media (min-width: 1200px) {
html {
font-size: 20px;
}
}
/**
* Sectioning
* Container and responsive spacings for header, main, footer
*/
main {
display: block;
}
body {
width: 100%;
margin: 0;
}
body > header,
body > main,
body > footer {
width: 100%;
margin-right: auto;
margin-left: auto;
padding: 2rem 0;
}
/**
* Container
*/
.container,
.container-fluid {
width: 100%;
margin-right: auto;
margin-left: auto;
padding-right: 1rem;
padding-left: 1rem;
}
@media (min-width: 576px) {
.container {
padding-right: 0;
padding-left: 0;
max-width: 510px;
}
}
@media (min-width: 768px) {
.container {
max-width: 700px;
}
}
@media (min-width: 992px) {
.container {
max-width: 920px;
}
}
@media (min-width: 1200px) {
.container {
max-width: 1130px;
}
}
/**
* Grid
* Minimal grid system with auto-layout columns
*/
.grid {
grid-column-gap: 1rem;
grid-row-gap: 1rem;
display: grid;
grid-template-columns: 1fr;
margin: 0;
}
@media (min-width: 992px) {
.grid {
grid-template-columns: repeat(auto-fit, minmax(0%, 1fr));
}
}
.grid > * {
min-width: 0;
}
/**
* Horizontal scroller (<figure>)
*/
figure {
display: block;
margin-right: -1rem;
margin-left: -1rem;
padding: 0;
overflow-x: auto;
}
figure figcaption {
color: var(--muted-text);
font-size: 87.5%;
padding: 0.5rem 1rem;
}
@media (min-width: 576px) {
figure {
margin-right: 0;
margin-left: 0;
}
figure figcaption {
padding: 0.5rem 0;
}
}
/**
* Typography
*/
b,
strong {
font-weight: bolder;
}
sub,
sup {
position: relative;
font-size: .75rem;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25rem;
}
sup {
top: -0.5rem;
}
img {
max-width: 100%;
height: auto;
border-style: none;
}
svg,
img {
vertical-align: text-bottom;
}
address,
blockquote,
dl,
figure,
form,
ol,
p,
pre,
table,
ul {
margin-top: 0;
margin-bottom: 1.5rem;
color: var(--text);
font-size: 1rem;
font-style: normal;
}
a {
background-color: transparent;
color: var(--primary);
text-decoration: none;
transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, text-decoration 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
a:hover, a:active, a:focus {
color: var(--primary-hover);
text-decoration: underline;
}
a:focus {
outline: none;
background-color: var(--primary-focus);
}
a.secondary {
color: var(--secondary);
}
a.secondary:hover, a.secondary:active, a.secondary:focus {
color: var(--secondary-hover);
}
a.secondary:focus {
background-color: var(--secondary-focus);
}
a.contrast:not([role="button"]) {
box-shadow: inset 0 -0.33rem 0 var(--contrast-border);
color: var(--contrast);
}
a.contrast:not([role="button"]):hover, a.contrast:not([role="button"]):active, a.contrast:not([role="button"]):focus {
color: var(--contrast-hover);
}
a.contrast:not([role="button"]):focus {
background-color: var(--contrast-focus);
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0;
margin-bottom: 1.5rem;
font-weight: 700;
}
h1 {
margin-bottom: 3rem;
color: var(--h1);
font-size: 2rem;
}
h2 {
margin-bottom: 2.625rem;
color: var(--h2);
font-size: 1.75rem;
}
h3 {
margin-bottom: 2.25rem;
color: var(--h3);
font-size: 1.5rem;
}
h4 {
margin-bottom: 1.875rem;
color: var(--h4);
font-size: 1.25rem;
}
h5 {
margin-bottom: 1.6875rem;
color: var(--h5);
font-size: 1.125rem;
}
h6 {
color: var(--h6);
font-size: 1rem;
}
header h1 {
font-size: 3rem;
}
header h2 {
font-size: 2.625rem;
}
header h3 {
font-size: 2.25rem;
}
header h4 {
font-size: 1.875rem;
}
header h5 {
font-size: 1.6875rem;
}
header h6 {
font-size: 1.5rem;
}
hgroup {
margin-bottom: 1.5rem;
}
hgroup h1,
hgroup h2,
hgroup h3,
hgroup h4,
hgroup h5,
hgroup h6 {
margin-bottom: 0;
}
hgroup > *:last-child {
color: var(--muted-text);
font-size: 1.125rem;
font-weight: normal;
}
p {
margin-bottom: 0.75rem;
}
small {
font-size: 85%;
}
@media (min-width: 576px) {
small {
font-size: 83%;
}
}
@media (min-width: 768px) {
small {
font-size: 81%;
}
}
@media (min-width: 992px) {
small {
font-size: 79%;
}
}
@media (min-width: 1200px) {
small {
font-size: 77%;
}
}
ul,
ol {
padding-left: 1.5rem;
}
ul li,
ol li {
margin-bottom: 0.75rem;
}
ul li {
list-style: square;
}
mark {
padding: .125rem .25rem;
background: var(--mark);
color: var(--mark-text);
vertical-align: middle;
}
blockquote {
display: block;
margin: 3rem 0;
margin-right: -1rem;
margin-left: -1rem;
padding: 1rem;
border-left: 0.25rem solid var(--muted-border);
}
@media (min-width: 576px) {
blockquote {
margin-right: 0;
margin-left: 0;
}
}
blockquote footer {
margin-top: 0.75rem;
color: var(--muted-text);
}
abbr[title] {
border-bottom: 1px dotted;
text-decoration: none;
cursor: help;
}
ins {
color: var(--valid);
text-decoration: none;
}
del {
color: var(--invalid);
}
::selection {
background-color: var(--primary-focus);
}
/**
* Form elements
*/
input,
optgroup,
select,
textarea {
margin: 0;
font-family: inherit;
font-size: 1rem;
line-height: 1.5;
}
input {
overflow: visible;
}
select {
text-transform: none;
}
legend {
display: table;
max-width: 100%;
padding: 0;
color: inherit;
white-space: normal;
}
textarea {
overflow: auto;
}
[type="checkbox"],
[type="radio"] {
padding: 0;
}
[type="number"]::-webkit-inner-spin-button {
height: auto;
}
[type="search"] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
fieldset {
margin: 0;
margin-bottom: 1.5rem;
padding: 0;
border: 0;
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
form small {
display: block;
width: 100%;
}
label,
fieldset legend {
display: block;
margin-bottom: 0.125rem;
vertical-align: middle;
}
input,
select,
textarea {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: 1px solid var(--input-border);
border-radius: 0.25rem;
outline: none;
background-color: var(--input-background);
color: var(--text);
font-weight: normal;
vertical-align: middle;
transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
input::placeholder,
select::placeholder,
textarea::placeholder {
color: var(--muted-text);
opacity: 1;
}
input:active, input:focus,
select:active,
select:focus,
textarea:active,
textarea:focus {
border-color: var(--primary);
}
input:focus,
select:focus,
textarea:focus {
box-shadow: 0 0 0 0.2rem var(--primary-focus);
}
input[readonly], input[disabled],
select[readonly],
select[disabled],
textarea[readonly],
textarea[disabled] {
border-color: var(--muted-border);
box-shadow: none;
}
input[readonly] ~ label, input[disabled] ~ label,
select[readonly] ~ label,
select[disabled] ~ label,
textarea[readonly] ~ label,
textarea[disabled] ~ label {
color: var(--muted-text);
}
input[disabled],
select[disabled],
textarea[disabled] {
background-color: var(--muted-background);
opacity: .5;
}
input:focus:-moz-focusring,
select:focus:-moz-focusring,
textarea:focus:-moz-focusring {
color: transparent;
text-shadow: 0 0 0 #000;
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
margin-bottom: 1.5rem;
padding: 0.75rem 1rem;
}
input[type="color"] {
height: calc(3rem + 2px);
}
select::-ms-expand {
border: 0;
background-color: transparent;
}
select:not([multiple]) {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
background-position: center right .75rem;
background-repeat: no-repeat;
background-size: 1rem auto;
}
form small {
color: var(--muted-text);
}
input + small {
margin-top: -1rem;
margin-bottom: 1.5rem;
}
label > input:not([type="checkbox"]):not([type="radio"]),
label > select,
label > textarea {
margin-top: 0.125rem;
}
/**
* Form elements
*/
[type="checkbox"],
[type="radio"] {
display: inline-block;
width: 1rem;
height: 1rem;
margin-right: .375rem;
margin-bottom: 0.125rem;
vertical-align: middle;
cursor: pointer;
}
[type="checkbox"]::-ms-check,
[type="radio"]::-ms-check {
display: none;
}
[type="checkbox"]:checked,
[type="radio"]:checked {
border-color: var(--primary);
background-color: var(--primary);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFF' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
background-position: center;
background-repeat: no-repeat;
background-size: .66rem auto;
}
[type="checkbox"] ~ label,
[type="radio"] ~ label {
display: inline-block;
margin-right: .375rem;
margin-bottom: 0;
cursor: pointer;
}
[type="radio"] {
border-radius: 50%;
}
[type="radio"]:checked {
border-width: .33rem;
border-color: var(--primary);
background-color: var(--primary-inverse);
background-image: none;
}
[type="checkbox"][role="switch"] {
width: 1.85rem;
height: 1rem;
border: 2px solid var(--input-border);
border-radius: 1rem;
background-color: var(--input-border);
line-height: 1rem;
}
[type="checkbox"][role="switch"]:before {
display: block;
width: calc(1rem - 4px);
height: 100%;
border-radius: 50%;
background-color: var(--primary-inverse);
content: '';
transition: margin 0.1s ease-in-out;
}
[type="checkbox"][role="switch"]:checked {
border-color: var(--primary);
background-color: var(--primary);
background-image: none;
}
[type="checkbox"][role="switch"]:checked::before {
margin-right: 0;
margin-left: calc(0.925rem - 2px);
}
/**
* Button
*/
button {
margin: 0;
overflow: visible;
font-family: inherit;
text-transform: none;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
padding: 0;
border-style: none;
}
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
button {
display: block;
width: 100%;
margin-bottom: 1.5rem;
}
a[role="button"] {
display: inline-block;
text-decoration: none;
}
button,
input[type="submit"],
a[role="button"] {
padding: 0.75rem 1rem;
border: 1px solid var(--primary);
border-radius: 0.25rem;
outline: none;
background-color: var(--primary);
color: var(--primary-inverse);
font-size: 1rem;
font-weight: normal;
line-height: 1.5;
text-align: center;
cursor: pointer;
transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
button:hover, button:active, button:focus,
input[type="submit"]:hover,
input[type="submit"]:active,
input[type="submit"]:focus,
a[role="button"]:hover,
a[role="button"]:active,
a[role="button"]:focus {
border: 1px solid var(--primary-hover);
background-color: var(--primary-hover);
}
button:focus,
input[type="submit"]:focus,
a[role="button"]:focus {
box-shadow: 0 0 0 0.2rem var(--primary-focus);
}
input[type="reset"] {
cursor: pointer;
}
button[disabled],
input[type="submit"][disabled],
input[type="reset"][disabled],
a[role="button"][disabled] {
opacity: .5;
pointer-events: none;
}
/**
* Table
*/
table {
width: 100%;
border-spacing: 0;
}
th,
td {
padding: 0.5rem 1rem;
border-bottom: 1px solid var(--table-border);
color: var(--muted-text);
font-weight: 400;
text-align: left;
font-size: 0.875rem;
}
th,
thead td {
color: var(--text);
font-size: 1rem;
}
thead th,
thead td {
border-bottom: 3px solid var(--table-border);
}
tbody tr:nth-child(odd) {
background-color: var(--table-stripping);
}

7
css/pico.slim.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -2,8 +2,7 @@
* Pico: Customs styles for Docs * Pico: Customs styles for Docs
*/ */
/** /**
* Light theme (Default) [Additions for docs] * Theme: Additions for docs
* Can be forced with data-theme="light"
*/ */
[data-theme="light"], [data-theme="light"],
:root:not([data-theme="dark"]) { :root:not([data-theme="dark"]) {
@ -11,10 +10,6 @@
--nav-border: rgba(115, 130, 140, 0.2); --nav-border: rgba(115, 130, 140, 0.2);
} }
/**
* Dark theme (Auto) [Additions for docs]
* Automatically enabled if user has Dark mode enabled
*/
@media only screen and (prefers-color-scheme: dark) { @media only screen and (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) { :root:not([data-theme="light"]) {
--nav-background: rgba(16, 24, 30, 0.8); --nav-background: rgba(16, 24, 30, 0.8);
@ -22,10 +17,6 @@
} }
} }
/**
* Dark theme (Forced) [Additions for docs]
* Enabled if forced with data-theme="dark"
*/
[data-theme="dark"] { [data-theme="dark"] {
--nav-background: rgba(16, 24, 30, 0.8); --nav-background: rgba(16, 24, 30, 0.8);
--nav-border: rgba(115, 130, 140, 0.2); --nav-border: rgba(115, 130, 140, 0.2);

View file

@ -3,12 +3,10 @@
*/ */
// Config // Config
@import "../../scss/colors";
@import "../../scss/variables"; @import "../../scss/variables";
// Theming // Theming
@import "themes/light"; @import "themes/docs";
@import "themes/dark";
// Layout // Layout
@import "layout/main"; @import "layout/main";
@ -21,5 +19,4 @@
// Components // Components
@import "components/nav"; @import "components/nav";
//@import "components/card-code";
@import "components/theme-switcher"; @import "components/theme-switcher";

View file

@ -0,0 +1,7 @@
/**
* Theme: Additions for docs
*/
@import "../../../scss/themes/default/colors";
@import "docs/light";
@import "docs/dark";

View file

@ -1,8 +1,5 @@
/** // Dark theme (Auto) [Additions for docs]
* Dark theme (Auto) [Additions for docs] // Automatically enabled if user has Dark mode enabled
* Automatically enabled if user has Dark mode enabled
*/
@media only screen and (prefers-color-scheme: dark) { @media only screen and (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) { :root:not([data-theme="light"]) {
--nav-background: #{rgba(darken($grey-900, 6%), .8)}; --nav-background: #{rgba(darken($grey-900, 6%), .8)};
@ -12,11 +9,8 @@
/** // Dark theme (Forced) [Additions for docs]
* Dark theme (Forced) [Additions for docs] // Enabled if forced with data-theme="dark"
* Enabled if forced with data-theme="dark"
*/
[data-theme="dark"] { [data-theme="dark"] {
--nav-background: #{rgba(darken($grey-900, 6%), .8)}; --nav-background: #{rgba(darken($grey-900, 6%), .8)};
--nav-border: #{rgba($grey-500, .2)}; --nav-border: #{rgba($grey-500, .2)};

View file

@ -1,8 +1,5 @@
/** // Light theme (Default) [Additions for docs]
* Light theme (Default) [Additions for docs] // Can be forced with data-theme="light"
* Can be forced with data-theme="light"
*/
[data-theme="light"], [data-theme="light"],
:root:not([data-theme="dark"]) { :root:not([data-theme="dark"]) {
--nav-background: #{rgba($white, .7)}; --nav-background: #{rgba($white, .7)};

View file

@ -23,6 +23,9 @@ $enable-responsive-typography: true !default;
// .classless version if disabled // .classless version if disabled
$enable-classes: true !default; $enable-classes: true !default;
// Enable validation states for inputs
$enable-input-states: true !default;
// Spacings // Spacings
// //

View file

@ -1,5 +1,5 @@
/** /**
* Card sectionning (<article> > header, footer|pre) * Card sectionning (<article> > header, footer, pre)
*/ */
article { article {

View file

@ -82,7 +82,7 @@ pre {
} }
} }
// Code syntax // Code Syntax highlighting
code { code {
// Tags // Tags

View file

@ -0,0 +1,91 @@
/**
* Form elements
*/
// Checkboxes & Radios
[type="checkbox"],
[type="radio"] {
display: inline-block;
width: 1rem;
height: 1rem;
margin-right: .375rem;
margin-bottom: $spacing-label-input;
vertical-align: middle;
cursor: pointer;
&::-ms-check {
display: none; // unstyle IE checkboxes
}
&:checked {
border-color: var(--primary);
background-color: var(--primary);
// Source: https://feathericons.com/
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFF' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
background-position: center;
background-repeat: no-repeat;
background-size: .66rem auto;
}
& ~ label {
display: inline-block;
margin-right: .375rem;
margin-bottom: 0;
cursor: pointer;
}
}
// Radios
[type="radio"] {
border-radius: 50%;
&:checked {
border-width: .33rem;
border-color: var(--primary);
background-color: var(--primary-inverse);
background-image: none;
}
}
// Switchs
[type="checkbox"][role="switch"] {
// Config
$switch-height: 1rem;
$switch-width: 1.85rem;
$switch-border: 2px;
$switch-transition: .1s ease-in-out;
// Styles
width: $switch-width;
height: $switch-height;
border: $switch-border solid var(--input-border);
border-radius: $switch-height;
background-color: var(--input-border);
line-height: $switch-height;
&:before {
display: block;
width: calc(#{$switch-height} - #{$switch-border*2});
height: 100%;
border-radius: 50%;
background-color: var(--primary-inverse);
content: '';
transition: margin $switch-transition;
}
&:checked {
border-color: var(--primary);
background-color: var(--primary);
// Disable if check box icon is needed
background-image: none;
// Enable if check box icon is needed
// background-position: center left $switch-width/6;
// background-size: $switch-width/5 auto;
&::before {
margin-right: 0;
margin-left: calc(#{$switch-width/2} - #{$switch-border});
}
}
}

View file

@ -172,6 +172,8 @@ textarea {
margin-bottom: $spacing-typography; margin-bottom: $spacing-typography;
padding: $spacing-input-button; padding: $spacing-input-button;
@if $enable-input-states {
// Validation states // Validation states
&[invalid]:not(:focus), &[invalid]:not(:focus),
&[valid]:not(:focus) { &[valid]:not(:focus) {
@ -195,6 +197,7 @@ textarea {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23" + $valid-icon-color + "' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E"); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23" + $valid-icon-color + "' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
} }
} }
}
// Color // Color
input[type="color"] { input[type="color"] {
@ -218,94 +221,6 @@ select {
} }
} }
// Checkboxes & Radios
[type="checkbox"],
[type="radio"] {
display: inline-block;
width: 1rem;
height: 1rem;
margin-right: .375rem;
margin-bottom: $spacing-label-input;
vertical-align: middle;
cursor: pointer;
&::-ms-check {
display: none; // unstyle IE checkboxes
}
&:checked {
border-color: var(--primary);
background-color: var(--primary);
// Source: https://feathericons.com/
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23FFF' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
background-position: center;
background-repeat: no-repeat;
background-size: .66rem auto;
}
& ~ label {
display: inline-block;
margin-right: .375rem;
margin-bottom: 0;
cursor: pointer;
}
}
// Radios
[type="radio"] {
border-radius: 50%;
&:checked {
border-width: .33rem;
border-color: var(--primary);
background-color: var(--primary-inverse);
background-image: none;
}
}
// Switchs
[type="checkbox"][role="switch"] {
// Config
$switch-height: 1rem;
$switch-width: 1.85rem;
$switch-border: 2px;
$switch-transition: .1s ease-in-out;
// Styles
width: $switch-width;
height: $switch-height;
border: $switch-border solid var(--input-border);
border-radius: $switch-height;
background-color: var(--input-border);
line-height: $switch-height;
&:before {
display: block;
width: calc(#{$switch-height} - #{$switch-border*2});
height: 100%;
border-radius: 50%;
background-color: var(--primary-inverse);
content: '';
transition: margin $switch-transition;
}
&:checked {
border-color: var(--primary);
background-color: var(--primary);
// Disable if check box icon is needed
background-image: none;
// Enable if check box icon is needed
// background-position: center left $switch-width/6;
// background-size: $switch-width/5 auto;
&::before {
margin-right: 0;
margin-left: calc(#{$switch-width/2} - #{$switch-border});
}
}
}
// Helper // Helper
form small { form small {
color: var(--muted-text); color: var(--muted-text);

View file

@ -22,7 +22,6 @@ td {
th, th,
thead td { thead td {
color: var(--text); color: var(--text);
font-weight: bolder;
font-size: 1rem; font-size: 1rem;
} }

View file

@ -171,7 +171,6 @@ h6 {
// Increase headings font size inside <header> // Increase headings font size inside <header>
header { header {
h1 { h1 {
font-size: 2rem*1.5; font-size: 2rem*1.5;
} }
@ -258,6 +257,7 @@ ol {
margin-bottom: $spacing-typography/2; margin-bottom: $spacing-typography/2;
} }
} }
ul li { ul li {
list-style: square; list-style: square;
} }
@ -305,6 +305,7 @@ ins {
color: var(--valid); color: var(--valid);
text-decoration: none; text-decoration: none;
} }
// del // del
del { del {
color: var(--invalid); color: var(--invalid);

View file

@ -107,7 +107,5 @@ body {
} }
} }
} }
} }
} }

View file

@ -4,24 +4,23 @@
*/ */
// Config // Config
@import "colors";
@import "variables"; @import "variables";
// Theming // Theming
@import "themes/light"; @import "themes/default";
@import "themes/dark";
// Layout // Layout
@import "layout/document"; // html @import "layout/document"; // html
@import "layout/sectioning"; // body, header, main, footer @import "layout/sectioning"; // body, header, main, footer
@import "layout/container"; // .container, .container-fluid @import "layout/container"; // .container, .container-fluid
@import "layout/section"; // main > section @import "layout/section"; // section
@import "layout/grid"; // .grid @import "layout/grid"; // .grid
@import "layout/scroller"; // figure @import "layout/scroller"; // figure
// Content // Content
@import "content/typography"; // a, headings, p, ul, blockquote ... @import "content/typography"; // a, headings, p, ul, blockquote ...
@import "content/form"; // label, input, select, ... @import "content/form"; // label, input, select, ...
@import "content/form-checkbox-radio"; // type=checkbox, type=radio, role=switch
@import "content/button"; // button, a[role=button], ... @import "content/button"; // button, a[role=button], ...
@import "content/button-styles"; // .secondary, .contrast, .outline @import "content/button-styles"; // .secondary, .contrast, .outline
@import "content/table"; // table, tr, td, ... @import "content/table"; // table, tr, td, ...
@ -31,6 +30,6 @@
// Components // Components
@import "components/accordion"; // details, summary @import "components/accordion"; // details, summary
@import "components/card"; // article @import "components/card"; // article
@import "components/card-sectioning"; // article > header, footer|pre @import "components/card-sectioning"; // article > header, footer, pre
@import "components/nav"; // nav @import "components/nav"; // nav
@import "components/tooltip"; // data-tooltip @import "components/tooltip"; // data-tooltip

41
scss/pico.slim.scss Normal file
View file

@ -0,0 +1,41 @@
/*!
* Pico.css v0.1.0 (https://picocss.com)
* Copyright 2019 - Licensed under MIT
*
* Slim version example
* You can export only the modules you need
*/
$enable-responsive-spacings: false;
$enable-input-states: false;
// Config
@import "variables";
// Theming
@import "themes/default";
// Layout
@import "layout/document"; // html
@import "layout/sectioning"; // body, header, main, footer
@import "layout/container"; // .container, .container-fluid
// @import "layout/section"; // section
@import "layout/grid"; // .grid
@import "layout/scroller"; // figure
// Content
@import "content/typography"; // a, headings, p, ul, blockquote ...
@import "content/form"; // label, input, select, ...
@import "content/form-checkbox-radio"; // type=checkbox, type=radio, role=switch
@import "content/button"; // button, a[role=button], ...
// @import "content/button-styles"; // .secondary, .contrast, .outline
@import "content/table"; // table, tr, td, ...
// @import "content/code"; // pre, code, ...
// @import "content/miscs"; // hr, progress, template, [hidden]
// Components
// @import "components/accordion"; // details, summary
// @import "components/card"; // article
// @import "components/card-sectioning"; // article > header, footer, pre
// @import "components/nav"; // nav
// @import "components/tooltip"; // data-tooltip

View file

@ -0,0 +1,7 @@
/**
* Theme: default
*/
@import "default/colors";
@import "default/light";
@import "default/dark";

View file

@ -1,8 +1,5 @@
/** // Dark theme (Auto)
* Dark theme (Auto) // Automatically enabled if user has Dark mode enabled
* Automatically enabled if user has Dark mode enabled
*/
@media only screen and (prefers-color-scheme: dark) { @media only screen and (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) { :root:not([data-theme="light"]) {
@ -24,9 +21,7 @@
--primary-focus: #{rgba($primary-600, .25)}; --primary-focus: #{rgba($primary-600, .25)};
--primary-inverse: #{$white}; --primary-inverse: #{$white};
@if $enable-classes { // // Secondary Call-to-Action, links and kbd
// Secondary Call-to-Action and links
--secondary: #{$grey-600}; --secondary: #{$grey-600};
--secondary-hover: #{$grey-500}; --secondary-hover: #{$grey-500};
--secondary-focus: #{rgba($grey-600, .25)}; --secondary-focus: #{rgba($grey-600, .25)};
@ -38,7 +33,6 @@
--contrast-focus: #{rgba($grey-600, .25)}; --contrast-focus: #{rgba($grey-600, .25)};
--contrast-border: #{rgba($amber-200, .33)}; // For links --contrast-border: #{rgba($amber-200, .33)}; // For links
--contrast-inverse: #{darken($grey-900, 6%)}; --contrast-inverse: #{darken($grey-900, 6%)};
}
// Form elements // Form elements
--input-background: #{darken($grey-900, 6%)}; --input-background: #{darken($grey-900, 6%)};
@ -75,11 +69,8 @@
/** // Dark theme (Forced)
* Dark theme (Forced) // Enabled if forced with data-theme="dark"
* Enabled if forced with data-theme="dark"
*/
[data-theme="dark"] { [data-theme="dark"] {
// Document // Document
@ -100,9 +91,7 @@
--primary-focus: #{rgba($primary-600, .25)}; --primary-focus: #{rgba($primary-600, .25)};
--primary-inverse: #{$white}; --primary-inverse: #{$white};
@if $enable-classes { // Secondary Call-to-Action, links and kbd
// Secondary Call-to-Action and links
--secondary: #{$grey-600}; --secondary: #{$grey-600};
--secondary-hover: #{$grey-500}; --secondary-hover: #{$grey-500};
--secondary-focus: #{rgba($grey-600, .25)}; --secondary-focus: #{rgba($grey-600, .25)};
@ -114,7 +103,6 @@
--contrast-focus: #{rgba($grey-600, .25)}; --contrast-focus: #{rgba($grey-600, .25)};
--contrast-border: #{rgba($amber-200, .33)}; // For links --contrast-border: #{rgba($amber-200, .33)}; // For links
--contrast-inverse: #{darken($grey-900, 6%)}; --contrast-inverse: #{darken($grey-900, 6%)};
}
// Form elements // Form elements
--input-background: #{darken($grey-900, 6%)}; --input-background: #{darken($grey-900, 6%)};

View file

@ -1,8 +1,5 @@
/** // Light theme (Default)
* Light theme (Default) // Can be forced with data-theme="light"
* Can be forced with data-theme="light"
*/
[data-theme="light"], [data-theme="light"],
:root:not([data-theme="dark"]) { :root:not([data-theme="dark"]) {
@ -24,8 +21,7 @@
--primary-focus: #{rgba($primary-600, .125)}; --primary-focus: #{rgba($primary-600, .125)};
--primary-inverse: #{$white}; --primary-inverse: #{$white};
@if $enable-classes { // Secondary Call-to-Action, links and kbd
// Secondary Call-to-Action and links
--secondary: #{$grey-500}; --secondary: #{$grey-500};
--secondary-hover: #{$grey-700}; --secondary-hover: #{$grey-700};
--secondary-focus: #{rgba($grey-500, .125)}; --secondary-focus: #{rgba($grey-500, .125)};
@ -37,7 +33,6 @@
--contrast-focus: #{rgba($grey-500, .125)}; --contrast-focus: #{rgba($grey-500, .125)};
--contrast-border: #{rgba($amber-200, .5)}; // For links --contrast-border: #{rgba($amber-200, .5)}; // For links
--contrast-inverse: #{$white}; --contrast-inverse: #{$white};
}
// Form elements // Form elements
--input-background: #{$white}; --input-background: #{$white};
@ -60,8 +55,9 @@
// Code // Code
--code-background: #{lighten($grey-50, 2%)}; --code-background: #{lighten($grey-50, 2%)};
--code-inlined: #{$grey-50}; --code-inlined: #{$grey-50};
--code-color-2: #{hsl(330, 30%, 50%)}; --code-color-1: #{$grey-500)};
--code-color-3: #{hsl(185, 30%, 40%)}; --code-color-2: #{hsl(330, 40%, 50%)};
--code-color-3: #{hsl(185, 40%, 40%)};
--code-color-4: #{hsl(40, 20%, 50%)}; --code-color-4: #{hsl(40, 20%, 50%)};
--code-color-5: #{mix($grey-300, $grey-400)}; --code-color-5: #{mix($grey-300, $grey-400)};