Split main CSS file

* Split main CSS file
* Update Bootstrap Reboot [4.1.3 → 4.3.1]
* Move own theme rules from reboot.css to main.css
* package.json: fix scripts
This commit is contained in:
vimux 2019-12-08 12:11:25 -05:00
parent 965c3fa699
commit c77e4ede53
No known key found for this signature in database
GPG key ID: 5A34FDC4EE832E34
4 changed files with 371 additions and 317 deletions

View file

@ -1,120 +1,13 @@
/* CSS Reset (based on Bootstrap Reboot v4.1.3) */
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-ms-overflow-style: scrollbar;
-webkit-tap-highlight-color: transparent;
}
@-ms-viewport {
width: device-width;
}
article,
aside,
details,
dialog,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
body { body {
max-width: 1200px; max-width: 1200px;
margin: 0 auto; margin: 0 auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 1rem;
font-weight: 400;
line-height: 1.4;
color: #ddd;
text-align: left; text-align: left;
word-wrap: break-word; word-wrap: break-word;
overflow-wrap: break-word; overflow-wrap: break-word;
background-color: #1b1b1b;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
} }
hr {
margin: 20px 0;
border: 0;
border-top: 1px solid #444;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 600;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.75rem;
}
h3 {
font-size: 1.5rem;
}
h4 {
font-size: 1.375rem;
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1.125rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title] {
text-decoration: none;
cursor: help;
border-bottom: 1px dotted #c3c3c3;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul,
dl {
padding-left: 25px;
margin-top: 0;
margin-bottom: 1rem;
}
@media screen and (min-width: 480px) { @media screen and (min-width: 480px) {
ol, ol,
ul, ul,
@ -123,25 +16,8 @@ dl {
} }
} }
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: .5rem;
margin-left: 0;
}
blockquote { blockquote {
padding: 0 1rem; padding: 0 1rem;
margin: 0 0 1rem 1rem;
border-left: 5px solid #f8ae00; border-left: 5px solid #f8ae00;
} }
@ -149,83 +25,29 @@ blockquote footer {
text-align: right; text-align: right;
} }
b,
strong {
font-weight: bolder;
}
small {
font-size: 80%;
}
sub,
sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
sup {
top: -.5em;
}
a {
color: #f8ae00;
text-decoration: none;
background-color: transparent;
}
a:hover {
color: #fff;
text-decoration: underline;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
}
pre { pre {
padding: 1.25rem; padding: 1.25rem;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
-ms-overflow-style: scrollbar;
background-color: #111; background-color: #111;
} }
code { code {
padding: 1px 3px; padding: 1px 3px;
color: #e44;
background-color: #111; background-color: #111;
border-radius: 2px; border-radius: 2px;
} }
pre code { pre code {
padding: 0; padding: 0;
color: inherit;
background-color: inherit; background-color: inherit;
border-radius: 0; border-radius: 0;
} }
kbd { kbd {
padding: 2px 3px;
font-weight: 700; font-weight: 700;
color: #111;
background-color: #888;
} }
figure { figure {
display: inline-block; display: inline-block;
margin: 0 0 1rem;
} }
figcaption { figcaption {
@ -235,19 +57,12 @@ figcaption {
img { img {
max-width: 100%; max-width: 100%;
vertical-align: middle;
border-style: none;
}
svg {
overflow: hidden;
} }
table { table {
width: 100%; width: 100%;
margin-bottom: 1rem; margin-bottom: 1rem;
border-spacing: 0; border-spacing: 0;
border-collapse: collapse;
border-top: 1px solid #ddd; border-top: 1px solid #ddd;
border-left: 1px solid #ddd; border-left: 1px solid #ddd;
} }
@ -259,137 +74,10 @@ th {
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
} }
caption {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
color: #6c757d;
text-align: left;
caption-side: bottom;
}
th { th {
font-weight: 700; font-weight: 700;
} }
label {
display: inline-block;
margin-bottom: 0.5rem;
}
button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
input {
overflow: visible;
}
button,
select {
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;
}
input[type="radio"],
input[type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
display: block;
width: 100%;
max-width: 100%;
padding: 0;
margin-bottom: .5rem;
font-size: 1.5rem;
line-height: inherit;
color: inherit;
white-space: normal;
}
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: none;
}
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
summary {
display: list-item;
cursor: pointer;
}
mark {
background-color: #f8ae00;
}
.mt { .mt {
margin-top: 1rem; margin-top: 1rem;
} }

365
assets/css/reboot.css Normal file
View file

@ -0,0 +1,365 @@
/* CSS Reset (based on Bootstrap Reboot v4.3.1 | MIT) */
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
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: 1rem;
font-weight: 400;
line-height: 1.4;
color: #ddd;
background-color: #1b1b1b;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
[tabindex="-1"]:focus:not(:focus-visible) {
outline: 0 !important;
}
hr {
margin: 1.25rem 0;
color: inherit;
background-color: currentColor;
border: 0;
border-top: 1px solid #444;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 600;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.75rem;
}
h3 {
font-size: 1.5rem;
}
h4 {
font-size: 1.375rem;
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1.125rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title] {
text-decoration: none;
cursor: help;
border-bottom: 1px dotted #c3c3c3;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-left: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: .5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -.25em;
}
sup {
top: -.5em;
}
a {
color: #f8ae00;
text-decoration: none;
}
a:hover {
color: #fff;
text-decoration: underline;
}
a:not([href]),
a:not([href]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
font-size: 1em;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
color: #e44;
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.125rem 0.1875rem;
color: #111;
background-color: #888;
}
kbd kbd {
padding: 0;
font-size: 1em;
}
figure {
margin: 0 0 1rem;
}
img {
vertical-align: middle;
}
svg {
overflow: hidden;
vertical-align: middle;
}
table {
border-collapse: collapse;
}
caption {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
color: #6c757d;
text-align: left;
caption-side: bottom;
}
label {
display: inline-block;
margin-bottom: 0.5rem;
}
button {
border-radius: 0;
}
button:focus {
outline: 1px dotted;
outline: 5px auto -webkit-focus-ring-color;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
select {
word-wrap: normal;
}
[list]::-webkit-calendar-picker-indicator {
display: none;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: textfield;
}
textarea {
overflow: auto;
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: left;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: 1.5rem;
line-height: inherit;
color: inherit;
white-space: normal;
}
mark {
background-color: #f8ae00;
}
progress {
vertical-align: baseline;
}
::-webkit-datetime-edit {
overflow: visible;
line-height: 0;
}
[type="search"] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
summary {
display: list-item;
cursor: pointer;
}
template {
display: none;
}
main {
display: block;
}
[hidden] {
display: none !important;
}

View file

@ -14,8 +14,9 @@
{{- if .Site.Params.twitter_cards }} {{- if .Site.Params.twitter_cards }}
{{ template "_internal/twitter_cards.html" . }} {{ template "_internal/twitter_cards.html" . }}
{{- end }} {{- end }}
{{- $cssReboot := resources.Get "css/reboot.css" }}
{{- $cssMain := resources.Get "css/main.css" }} {{- $cssMain := resources.Get "css/main.css" }}
{{- $style := $cssMain }} {{- $style := slice $cssReboot $cssMain | resources.Concat "css/bundle.css" }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}"> <link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{- range .Site.Params.customCSS }} {{- range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ . | relURL }}"> <link rel="stylesheet" href="{{ . | relURL }}">

View file

@ -51,12 +51,12 @@
"stylelint-order": "^3.0.0" "stylelint-order": "^3.0.0"
}, },
"scripts": { "scripts": {
"lint:prefixes": "postcss static/css/*.css", "lint:prefixes": "postcss static/css/*.css assets/css/*.css",
"lint:css": "stylelint static/css/*.css", "lint:css": "stylelint static/css/*.css assets/css/*.css",
"lint:js": "eslint static/js/*.js", "lint:js": "eslint static/js/*.js",
"lint": "npm run lint:css && npm run lint:js", "lint": "npm run lint:css && npm run lint:js",
"fix:prefixes": "postcss -r static/css/*.css", "fix:prefixes": "postcss -r static/css/*.css assets/css/*.css",
"fix:css": "stylelint static/css/*.css --fix", "fix:css": "stylelint static/css/*.css assets/css/*.css --fix",
"fix:js": "eslint static/js/*.js --fix", "fix:js": "eslint static/js/*.js --fix",
"fix": "npm run fix:prefixes && npm run fix:css && npm run fix:js", "fix": "npm run fix:prefixes && npm run fix:css && npm run fix:js",
"test": "npm run lint" "test": "npm run lint"