forked from CCCHH/hacker.tours-website
Initial version
This commit is contained in:
commit
ed5653a7fc
57 changed files with 11043 additions and 0 deletions
94
themes/zen/assets/sass/_colors.scss
Normal file
94
themes/zen/assets/sass/_colors.scss
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
// stylelint-disable color-no-hex, color-named, value-list-max-empty-lines
|
||||
// stylelint-disable scss/dollar-variable-colon-space-after, scss/dollar-variable-empty-line-before
|
||||
|
||||
// Base colors.
|
||||
$black: #000;
|
||||
$nearblack: lighten($black, 20%); // #333
|
||||
$grey-dark: lighten($black, 40%); // #666
|
||||
$grey: lighten($black, 60%); // #999
|
||||
$grey-light: lighten($black, 80%); // #ccc
|
||||
$grey-extra-light: lighten($black, 93.33%); // #eee
|
||||
$nearwhite: lighten($black, 97%); // #f7f7f7
|
||||
$white: #fff;
|
||||
|
||||
$blue: #0072b9;
|
||||
$red: #c00;
|
||||
$green: #43a808;
|
||||
$yellow: #fd0;
|
||||
|
||||
$brand: $nearblack;
|
||||
$brand-alt: $grey;
|
||||
$brand-light: $grey-light;
|
||||
$brand-dark: $grey-dark;
|
||||
|
||||
// Colour map.
|
||||
$colors: (
|
||||
brand: $brand,
|
||||
brand-alt: $brand-alt,
|
||||
brand-light: $brand-light,
|
||||
brand-dark: $brand-dark,
|
||||
|
||||
text: $black,
|
||||
text-bg: $white,
|
||||
text-meta: $grey-dark,
|
||||
|
||||
link: $brand,
|
||||
link-visited: $brand,
|
||||
link-hover: $brand-alt,
|
||||
link-active: $red,
|
||||
|
||||
link-inverted: $white,
|
||||
link-visited-inverted: $white,
|
||||
link-hover-inverted: $white,
|
||||
link-active-inverted: $red,
|
||||
|
||||
border: $brand,
|
||||
border-light: $brand-light,
|
||||
border-dark: $brand-dark,
|
||||
|
||||
autocomplete: $black,
|
||||
autocomplete-bg: $white,
|
||||
autocomplete-select: $white,
|
||||
autocomplete-select-bg: $blue,
|
||||
|
||||
body-bg: $white,
|
||||
header-bg: $white,
|
||||
footer-bg: $white,
|
||||
backdrop: $grey-extra-light,
|
||||
|
||||
mobile-menu: $brand,
|
||||
mobile-menu-cover: rgba($black, .2),
|
||||
|
||||
button: $brand,
|
||||
button-hover: $brand-alt,
|
||||
button-text: $white,
|
||||
button-text-hover: $white,
|
||||
button-disabled: $grey,
|
||||
|
||||
mark-highlight: $red,
|
||||
mark-bg: $yellow,
|
||||
|
||||
menu-active: $black,
|
||||
|
||||
preview-bg: lighten($yellow, 43%),
|
||||
|
||||
row-header: transparent,
|
||||
row-odd: $nearwhite,
|
||||
row-even: transparent,
|
||||
|
||||
status: $green,
|
||||
status-bg: lighten($green, 62%),
|
||||
warning: $black,
|
||||
warning-bg: lighten($yellow, 45%),
|
||||
warning-border: $yellow,
|
||||
error: $red,
|
||||
error-bg: lighten($red, 57%),
|
||||
|
||||
watermark: $grey-extra-light,
|
||||
|
||||
headings: $nearblack,
|
||||
|
||||
code: $nearblack,
|
||||
|
||||
highlight: $brand-alt,
|
||||
);
|
||||
1
themes/zen/assets/sass/_custom.scss
Normal file
1
themes/zen/assets/sass/_custom.scss
Normal file
|
|
@ -0,0 +1 @@
|
|||
// Site custom styles. This file loads last.
|
||||
1
themes/zen/assets/sass/_extra.scss
Normal file
1
themes/zen/assets/sass/_extra.scss
Normal file
|
|
@ -0,0 +1 @@
|
|||
// Add and override variables. This file loads last during init.
|
||||
27
themes/zen/assets/sass/_fonts.scss
Normal file
27
themes/zen/assets/sass/_fonts.scss
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
// Font faces
|
||||
//
|
||||
// Instead of relying on the fonts that are available on a user's computer, you
|
||||
// can use web fonts which, like images, are resources downloaded to the user's
|
||||
// browser. Because of the bandwidth and rendering resources required, web fonts
|
||||
// should be used with care.
|
||||
//
|
||||
// Numerous resources for web fonts can be found on the web. Here are a few
|
||||
// websites where you can find Open Source fonts to download:
|
||||
// - https://www.fontsquirrel.com/
|
||||
// - https://www.theleagueofmoveabletype.com
|
||||
// - https://fonts.google.com
|
||||
//
|
||||
// In order to use fonts on a web site you will need to convert them into woff2 format.
|
||||
// Font Squirrel's Font-Face Generator is a good option:
|
||||
// https://www.fontsquirrel.com/tools/webfont-generator
|
||||
//
|
||||
// The following is an example @font-face declaration. This font can then be
|
||||
// used in any ruleset using a property like this: font-family: Example, serif;
|
||||
//
|
||||
// @font-face {
|
||||
// font-family: 'Example';
|
||||
// src: url('../fonts/example.woff2') format('woff2');
|
||||
// font-weight: normal;
|
||||
// font-style: normal;
|
||||
// font-display: swap;
|
||||
// }
|
||||
20
themes/zen/assets/sass/_init.scss
Normal file
20
themes/zen/assets/sass/_init.scss
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// Initialization partial
|
||||
|
||||
// To make it easier to use all variables and mixins in any Sass file in this
|
||||
// project, each .scss file has a `@import 'init';` declaration. The _init.scss
|
||||
// file is in charge of importing all the other partials needed for the
|
||||
// project.
|
||||
|
||||
// Colours and variables.
|
||||
@import 'colors';
|
||||
@import 'variables';
|
||||
@import 'extra';
|
||||
|
||||
// Mixins and functions.
|
||||
@import 'mixins/breakpoint/respond-to';
|
||||
@import 'mixins/clearfix/clearfix';
|
||||
@import 'mixins/debug/debug';
|
||||
@import 'mixins/flex-calc/flex-calc';
|
||||
@import 'mixins/image-url/image-url';
|
||||
@import 'mixins/rtl/rtl';
|
||||
@import 'mixins/spacing/spacing';
|
||||
114
themes/zen/assets/sass/_reset.scss
Normal file
114
themes/zen/assets/sass/_reset.scss
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
// stylelint-disable property-no-vendor-prefix
|
||||
// Reset browsers to some sane defaults.
|
||||
|
||||
// Document
|
||||
|
||||
html {
|
||||
// Prevent adjustments of font size.
|
||||
-webkit-text-size-adjust: none;
|
||||
text-size-adjust: none;
|
||||
// On short pages, we want any background gradients to fill the entire height
|
||||
// of the browser.
|
||||
min-height: 100%;
|
||||
// Use the saner border-box model.
|
||||
box-sizing: border-box;
|
||||
// Use smooth scrolling.
|
||||
scroll-behavior: smooth;
|
||||
// Improve text rendering.
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
// Use the saner border-box model for all elements.
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
// Sections
|
||||
|
||||
body {
|
||||
// Remove the margin in all browsers.
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
// Embedded content
|
||||
|
||||
img,
|
||||
picture,
|
||||
video,
|
||||
canvas,
|
||||
svg {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin-inline: 0;
|
||||
}
|
||||
|
||||
// Form defaults.
|
||||
|
||||
input,
|
||||
button,
|
||||
textarea,
|
||||
select {
|
||||
font: inherit;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
font-weight: var(--fw-bold);
|
||||
}
|
||||
|
||||
[type='search'] {
|
||||
@include respond-to(s) {
|
||||
// Correct the odd appearance in Safari on desktop.
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
}
|
||||
|
||||
// Text-level semantics
|
||||
//
|
||||
// The elements in this section give semantics to inline text.
|
||||
|
||||
// Code
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: var(--ff-monospace);
|
||||
}
|
||||
|
||||
// Mark text
|
||||
|
||||
mark {
|
||||
@extend %highlight-mark;
|
||||
}
|
||||
|
||||
// Superscript / Subscript
|
||||
|
||||
sub,
|
||||
sup {
|
||||
// Prevent `sub` and `sup` elements from affecting the line height in
|
||||
// all browsers.
|
||||
font-size: var(--fs-xs);
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -.5em;
|
||||
}
|
||||
35
themes/zen/assets/sass/_root.scss
Normal file
35
themes/zen/assets/sass/_root.scss
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
$breakout: $gutters !default;
|
||||
$max-page-width: $max-content-width !default;
|
||||
|
||||
:root {
|
||||
// Convert sass variables to css4 variables.
|
||||
// Use like this: var(--color-brand).
|
||||
@each $name, $color in $colors {
|
||||
--color-#{$name}: #{$color};
|
||||
}
|
||||
|
||||
@each $name, $size in $font-size {
|
||||
--fs-#{$name}: #{$size};
|
||||
}
|
||||
|
||||
@each $name, $weight in $font-weight {
|
||||
--fw-#{$name}: #{$weight};
|
||||
}
|
||||
|
||||
@each $name, $family in $font-family {
|
||||
--ff-#{$name}: #{$family};
|
||||
}
|
||||
|
||||
@each $name, $radius in $border-radius {
|
||||
--radius-#{$name}: #{$radius};
|
||||
}
|
||||
|
||||
--breakout: #{$breakout};
|
||||
--gutters-reverse: #{$gutters-reverse};
|
||||
--gutters: #{$gutters};
|
||||
--heading-line-height: #{$heading-line-height};
|
||||
--indent-amount: #{$indent-amount};
|
||||
--max-content-width: #{$max-content-width};
|
||||
--max-line-width: #{$max-line-width};
|
||||
--max-page-width: #{$max-page-width};
|
||||
}
|
||||
163
themes/zen/assets/sass/_variables.scss
Normal file
163
themes/zen/assets/sass/_variables.scss
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
// stylelint-disable max-line-length, number-leading-zero, number-no-trailing-zeros
|
||||
// stylelint-disable scss/dollar-variable-colon-space-after, value-keyword-case
|
||||
|
||||
// Variables
|
||||
|
||||
// Font faces, stacks and sizes.
|
||||
|
||||
// The font size set on the root html element.
|
||||
// Specify unitless, it will be recalculated as %.
|
||||
$base-font-size: 18;
|
||||
|
||||
// Base and heading line height, unitless.
|
||||
$base-line-height: 1.5;
|
||||
$heading-line-height: 1.3;
|
||||
|
||||
// The pt font-size to be used for printing.
|
||||
$print-font-size: 12pt;
|
||||
|
||||
// The font sizes in our type hierarchy as tee shirt sizes.
|
||||
// Size m is base.
|
||||
// Use like this: var(--fs-m)
|
||||
$font-size-fixed: (
|
||||
xxxxl: 3rem,
|
||||
xxxl: 2.5rem,
|
||||
xxl: 2rem,
|
||||
xl: 1.5rem,
|
||||
l: 1.25rem,
|
||||
m: 1rem,
|
||||
s: 0.889rem,
|
||||
xs: 0.778rem,
|
||||
);
|
||||
|
||||
// The responsive font sizes in our type hierarchy as tee shirt sizes.
|
||||
// Size m is base.
|
||||
// Use like this: var(--fs-m)
|
||||
$font-size-fluid: (
|
||||
xxxxl: clamp(2.4881rem, calc(1.8896rem + 2.9924vw), 4.2088rem),
|
||||
xxxl: clamp(2.0738rem, calc(1.6968rem + 1.8848vw), 3.1575rem),
|
||||
xxl: clamp(1.7281rem, calc(1.5053rem + 1.1141vw), 2.3688rem),
|
||||
xl: clamp(1.44rem, calc(1.3228rem + 0.5859vw), 1.7769rem),
|
||||
l: clamp(1.2rem, calc(1.1537rem + 0.2315vw), 1.3331rem),
|
||||
m: 1rem,
|
||||
s: 0.889rem,
|
||||
xs: 0.778rem,
|
||||
);
|
||||
|
||||
// Set the font sizes to use, fixed or fluid.
|
||||
$font-size: $font-size-fixed;
|
||||
// $font-size: $font-size-fluid;
|
||||
|
||||
// Font weights.
|
||||
// Use like this: var(--fw-normal)
|
||||
$font-weight: (
|
||||
headings: 700,
|
||||
bolder: 900,
|
||||
bold: 700,
|
||||
medium: 500,
|
||||
normal: 400,
|
||||
light: 300,
|
||||
lighter: 200,
|
||||
);
|
||||
|
||||
// The following font family declarations use widely available fonts.
|
||||
// A user's web browser will look at the comma-separated list and will
|
||||
// attempt to use each font in turn until it finds one that is available
|
||||
// on the user's computer. The final "generic" font (sans-serif, serif or
|
||||
// monospace) hints at what type of font to use if the web browser doesn't
|
||||
// find any of the fonts in the list.
|
||||
|
||||
// System-ui font stack.
|
||||
$system-ui: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', 'Liberation Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
||||
|
||||
// Serif font stacks.
|
||||
$ui-serif: ui-serif, Constantia, 'Noto Serif', Georgia, serif;
|
||||
$times: 'Times New Roman', 'Liberation Serif', 'Nimbus Roman No9 L', serif;
|
||||
$georgia: Georgia, 'Noto Serif', ui-serif, serif;
|
||||
$garamond: Garamond, Charter, Cambria, 'Noto Serif', ui-serif, serif;
|
||||
|
||||
// Sans-serif font stacks.
|
||||
$ui-sans-serif: ui-sans-serif, $system-ui;
|
||||
$helvetica: 'Helvetica Neue', Helvetica, 'Liberation Sans', 'Nimbus Sans L', Arial, sans-serif;
|
||||
$futura: Futura, 'Century Gothic', Montserrat, Calibri, ui-sans-serif, sans-serif;
|
||||
|
||||
// Monospace font stacks.
|
||||
$ui-monospace: ui-monospace, Menlo, 'Cascadia Mono', 'Segoe UI Mono', 'Noto Sans Mono', 'Liberation Mono', Monaco, Consolas, monospace;
|
||||
|
||||
// Font family.
|
||||
// Use like this: var(--ff-body)
|
||||
$font-family: (
|
||||
body: $ui-serif,
|
||||
headings: $ui-sans-serif,
|
||||
alt: $system-ui,
|
||||
monospace: $ui-monospace,
|
||||
);
|
||||
|
||||
// Breakpoints
|
||||
// Use the `respond-to(s)` mixin to use named breakpoints.
|
||||
$breakpoints: (
|
||||
'xxxl': 1222px,
|
||||
'xxl': 1111px,
|
||||
'xl': 999px,
|
||||
'l': 888px,
|
||||
'm': 777px,
|
||||
's': 666px,
|
||||
'xs': 555px,
|
||||
'xxs': 444px,
|
||||
'xxxs': 333px,
|
||||
);
|
||||
|
||||
// Border radius.
|
||||
// Use like this: var(--radius-m)
|
||||
$border-radius: (
|
||||
xl: 1rem,
|
||||
l: 0.75rem,
|
||||
m: 0.5rem,
|
||||
s: 0.3rem,
|
||||
xs: 0.125rem,
|
||||
);
|
||||
|
||||
// Spacing
|
||||
// Generates mt-m (mt = margin-top), mb-m (mb = margin-bottom) and
|
||||
// mtb-m (mtb = margin-block) classes.
|
||||
$spacing: (
|
||||
xxl: 3,
|
||||
xl: 2,
|
||||
l: 1.5,
|
||||
m: 1,
|
||||
s: 0.75,
|
||||
xs: 0.5,
|
||||
xxs: 0.3,
|
||||
0: 0,
|
||||
);
|
||||
|
||||
// The max content width. (Consider using one of the breakpoints.)
|
||||
$max-content-width: 1111px;
|
||||
|
||||
// The max page width. Defaults to max-content-width.
|
||||
// Setting this to a larger value than max-content-width allows
|
||||
// content with class "stretch" to stretch out to the page edge.
|
||||
// $max-page-width: 1111px;
|
||||
|
||||
// The max line width for readability.
|
||||
$max-line-width: 70ch;
|
||||
|
||||
// The left/right gutter/padding.
|
||||
// Use like this: var(--gutters)
|
||||
$gutters: calc(5px + 1.5625vw);
|
||||
$gutters-reverse: calc(0px - (5px + 1.5625vw));
|
||||
|
||||
// Breakout amount.
|
||||
// How much should the "breakout" be. Defaults to gutters value.
|
||||
// $breakout: calc(5px + 1.5625vw);
|
||||
|
||||
// The amount lists, blockquotes and comments are indented.
|
||||
// Use like this: var(--indent-amount)
|
||||
$indent-amount: 2rem;
|
||||
|
||||
// Control whether RTL styles are added.
|
||||
$include-rtl: false;
|
||||
|
||||
// Show horizontal grid to help with debugging typography.
|
||||
$debug: false;
|
||||
$debug-color: $grey-extra-light;
|
||||
167
themes/zen/assets/sass/_zen.scss
Normal file
167
themes/zen/assets/sass/_zen.scss
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
// Zen custom styles
|
||||
|
||||
// Page
|
||||
|
||||
body {
|
||||
background-color: var(--color-backdrop);
|
||||
}
|
||||
|
||||
.page {
|
||||
background-color: var(--color-body-bg);
|
||||
}
|
||||
|
||||
.footer {
|
||||
border-top: 2px solid var(--color-border);
|
||||
}
|
||||
|
||||
// Apply smaller text to blocks, footer etc.
|
||||
|
||||
th,
|
||||
label,
|
||||
legend,
|
||||
figcaption {
|
||||
font-size: var(--fs-s);
|
||||
}
|
||||
|
||||
.language-selector,
|
||||
.footer {
|
||||
font-size: var(--fs-xs);
|
||||
}
|
||||
|
||||
// Apply heading font stack and colour to labels etc.
|
||||
|
||||
th,
|
||||
nav,
|
||||
label,
|
||||
legend,
|
||||
.header,
|
||||
.footer {
|
||||
color: var(--color-headings);
|
||||
font-family: var(--ff-headings);
|
||||
}
|
||||
|
||||
th,
|
||||
label {
|
||||
font-weight: var(--fw-headings);
|
||||
}
|
||||
|
||||
// Article and content.
|
||||
|
||||
article,
|
||||
aside {
|
||||
& > ul {
|
||||
@extend %ul-straight-left;
|
||||
}
|
||||
|
||||
& > ol {
|
||||
@extend %ol-straight-left;
|
||||
}
|
||||
}
|
||||
|
||||
article {
|
||||
.submitted,
|
||||
.tags {
|
||||
@include respond-to(s) {
|
||||
display: inline-block;
|
||||
padding-inline-end: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: var(--fs-xs);
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
pre {
|
||||
border-radius: var(--radius-xs);
|
||||
padding: 5px;
|
||||
border: 1px solid var(--color-border-light);
|
||||
background-color: var(--color-text-bg);
|
||||
overflow: auto;
|
||||
max-height: 300px;
|
||||
max-width: 90vw;
|
||||
|
||||
&.chroma {
|
||||
max-height: initial;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
& > code {
|
||||
display: inline-block;
|
||||
white-space: pre;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content-dates {
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
// Navigation
|
||||
|
||||
.main-menu {
|
||||
margin-top: .75rem;
|
||||
outline: 0;
|
||||
|
||||
li {
|
||||
margin-bottom: .75rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
display: block;
|
||||
background-color: var(--color-button);
|
||||
color: var(--color-text-bg);
|
||||
padding: 2px 8px;
|
||||
text-decoration: none;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: var(--color-button-hover);
|
||||
}
|
||||
|
||||
&:active,
|
||||
&[aria-current] {
|
||||
background-color: var(--color-button);
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Search
|
||||
|
||||
.search-text {
|
||||
font-size: var(--fs-l);
|
||||
}
|
||||
|
||||
// Form
|
||||
|
||||
main {
|
||||
input,
|
||||
textarea {
|
||||
&:not(:placeholder-shown):valid {
|
||||
background-color: var(--color-status-bg);
|
||||
}
|
||||
|
||||
&:not(:placeholder-shown):invalid {
|
||||
background-color: var(--color-error-bg);
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
@extend %button--shadow;
|
||||
}
|
||||
}
|
||||
|
||||
.js-submitted {
|
||||
input,
|
||||
textarea {
|
||||
&:valid {
|
||||
background-color: var(--color-status-bg);
|
||||
}
|
||||
|
||||
&:invalid {
|
||||
background-color: var(--color-error-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
10
themes/zen/assets/sass/base/_base.scss
Normal file
10
themes/zen/assets/sass/base/_base.scss
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// Base styles.
|
||||
|
||||
// Broken into modular pieces to make it easier to edit.
|
||||
@import 'document/document';
|
||||
@import 'forms/forms';
|
||||
@import 'grouping/grouping';
|
||||
@import 'headings/headings';
|
||||
@import 'images/images';
|
||||
@import 'links/links';
|
||||
@import 'tables/tables';
|
||||
18
themes/zen/assets/sass/base/document/_document.scss
Normal file
18
themes/zen/assets/sass/base/document/_document.scss
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// Document
|
||||
|
||||
html {
|
||||
// Change the default font family in all browsers.
|
||||
font-family: var(--ff-body);
|
||||
// Set base font size in percent.
|
||||
font-size: calc(#{$base-font-size} / 16 * 100%);
|
||||
// Correct the line height in all browsers.
|
||||
line-height: $base-line-height;
|
||||
// Set text colour.
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
body {
|
||||
// Output a horizontal grid to help with debugging typography. The
|
||||
// $debug variable will toggle its output.
|
||||
@include debug-grid();
|
||||
}
|
||||
66
themes/zen/assets/sass/base/forms/_forms.scss
Normal file
66
themes/zen/assets/sass/base/forms/_forms.scss
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
// stylelint-disable property-no-vendor-prefix
|
||||
|
||||
// Form defaults.
|
||||
|
||||
form {
|
||||
// Add vertical rhythm margins.
|
||||
@include margin-block(0 1);
|
||||
}
|
||||
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
@include margin-block(0 1);
|
||||
}
|
||||
|
||||
// Mark field as required if needed.
|
||||
label {
|
||||
&:has(+ :required) {
|
||||
&::after {
|
||||
content: '*';
|
||||
color: var(--color-mark-highlight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set max text line width in main for readability.
|
||||
input,
|
||||
label,
|
||||
textarea,
|
||||
select {
|
||||
max-width: var(--max-line-width);
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
input {
|
||||
// Writing "Min" instead of "min" to force use of css "min()" instead of sass "min()".
|
||||
// stylelint-disable-next-line function-name-case
|
||||
width: Min(20em, 100%);
|
||||
}
|
||||
|
||||
[type='text'],
|
||||
textarea {
|
||||
// Writing "Min" instead of "min" to force use of css "min()" instead of sass "min()".
|
||||
// stylelint-disable-next-line function-name-case
|
||||
width: Min(30em, 100%);
|
||||
}
|
||||
|
||||
// For forms with multibple fields show submit button below the form.
|
||||
input:not(:only-of-type),
|
||||
textarea {
|
||||
& + [type='submit'] {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
// For forms none mobile with single field add space between it and the submit button.
|
||||
@include respond-to(s) {
|
||||
input:only-of-type {
|
||||
&:has(+ [type='submit']) {
|
||||
margin-right: .5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
99
themes/zen/assets/sass/base/grouping/_grouping.scss
Normal file
99
themes/zen/assets/sass/base/grouping/_grouping.scss
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
// Grouping content
|
||||
|
||||
// Block quotes
|
||||
//
|
||||
// The `<blockquote>` element is for quoting blocks of content from another
|
||||
// source within your document. Wrap the `<blockquote>` around any <abbr
|
||||
// title="HyperText Markup Language">HTML</abbr> as the quote. For straight
|
||||
// quotes, we recommend a `<p>`.
|
||||
//
|
||||
// Optionally, add a `<footer>` to identify the source of the quote, wrapping
|
||||
// the name of the source work in `<cite>`.
|
||||
|
||||
blockquote {
|
||||
// Add vertical rhythm margins.
|
||||
@include margin-block(0 1);
|
||||
// Also indent the quote on both sides.
|
||||
margin-inline: var(--indent-amount);
|
||||
}
|
||||
|
||||
// Lists
|
||||
|
||||
dl,
|
||||
ol,
|
||||
ul,
|
||||
menu {
|
||||
// Add vertical rhythm margins.
|
||||
@include margin-block(0 1);
|
||||
}
|
||||
|
||||
dd {
|
||||
margin: 0;
|
||||
margin-inline-start: var(--indent-amount);
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
menu {
|
||||
padding: 0;
|
||||
padding-inline-start: var(--indent-amount);
|
||||
|
||||
// Turn off margins on nested lists.
|
||||
ol,
|
||||
ul,
|
||||
menu {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
// Set max text line width in main for readability.
|
||||
.main & {
|
||||
max-width: var(--max-line-width);
|
||||
}
|
||||
}
|
||||
|
||||
// Header
|
||||
|
||||
header {
|
||||
// Add vertical rhythm margins.
|
||||
@include margin-block(0 .33);
|
||||
}
|
||||
|
||||
// Horizontal rule
|
||||
|
||||
hr {
|
||||
@extend %divider;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
// Paragraphs
|
||||
|
||||
p {
|
||||
// Add vertical rhythm margins.
|
||||
@include margin-block(0 1);
|
||||
// Nicer text wrap, e.g. no lone work on last line.
|
||||
text-wrap: pretty;
|
||||
|
||||
// Set max text line width in main for readability.
|
||||
.main & {
|
||||
max-width: var(--max-line-width);
|
||||
}
|
||||
}
|
||||
|
||||
// Preformatted text
|
||||
|
||||
pre {
|
||||
// Add vertical rhythm margins.
|
||||
@include margin-block(0 1);
|
||||
font-family: var(--ff-monospace);
|
||||
}
|
||||
|
||||
// Code
|
||||
|
||||
// Do not set colour for code with syntax highlighting.
|
||||
code:not([data-lang]),
|
||||
kbd,
|
||||
samp {
|
||||
color: var(--color-code);
|
||||
}
|
||||
69
themes/zen/assets/sass/base/headings/_headings.scss
Normal file
69
themes/zen/assets/sass/base/headings/_headings.scss
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
// Headings
|
||||
//
|
||||
// All HTML headings, `<h1>` through `<h6>`, are available. `%h1` through `%h6`
|
||||
// classes are also available, for when you want to match the font styling of a
|
||||
// heading but not be a heading.
|
||||
h1,
|
||||
%h1,
|
||||
h2,
|
||||
%h2,
|
||||
h3,
|
||||
%h3,
|
||||
h4,
|
||||
%h4,
|
||||
h5,
|
||||
%h5,
|
||||
h6,
|
||||
%h6 {
|
||||
@include margin-block(1 .33, 'em');
|
||||
color: var(--color-headings);
|
||||
font-family: var(--ff-headings);
|
||||
font-weight: var(--fw-headings);
|
||||
line-height: var(--heading-line-height);
|
||||
text-wrap: balance;
|
||||
|
||||
// Smaller margin when a headeing is right after another heading.
|
||||
& + & {
|
||||
@include margin-block-start(.5, 'em');
|
||||
}
|
||||
|
||||
// Set max text line width in main for readability.
|
||||
.main & {
|
||||
max-width: var(--max-line-width);
|
||||
}
|
||||
}
|
||||
|
||||
h1,
|
||||
%h1 {
|
||||
// h1 only on top of page so different margins.
|
||||
@include margin-block(1 .5, 'rem');
|
||||
font-size: var(--fs-xxl);
|
||||
letter-spacing: -.01em;
|
||||
}
|
||||
|
||||
h2,
|
||||
%h2 {
|
||||
font-size: var(--fs-xl);
|
||||
letter-spacing: -.01em;
|
||||
}
|
||||
|
||||
h3,
|
||||
%h3 {
|
||||
font-size: var(--fs-l);
|
||||
letter-spacing: -.01em;
|
||||
}
|
||||
|
||||
h4,
|
||||
%h4 {
|
||||
font-size: var(--fs-m);
|
||||
}
|
||||
|
||||
h5,
|
||||
%h5 {
|
||||
font-size: var(--fs-s);
|
||||
}
|
||||
|
||||
h6,
|
||||
%h6 {
|
||||
font-size: var(--fs-xs);
|
||||
}
|
||||
82
themes/zen/assets/sass/base/images/_images.scss
Normal file
82
themes/zen/assets/sass/base/images/_images.scss
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
// Figure and image.
|
||||
|
||||
figure,
|
||||
img {
|
||||
&.image {
|
||||
--image-padding: .75rem;
|
||||
|
||||
@include respond-to(s) {
|
||||
&.center {
|
||||
margin-inline: auto;
|
||||
}
|
||||
|
||||
&.left {
|
||||
padding-inline-end: var(--image-padding);
|
||||
padding-block-end: var(--image-padding);
|
||||
margin: 0;
|
||||
float: left;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
&.right {
|
||||
padding-inline-start: var(--image-padding);
|
||||
padding-block-end: var(--image-padding);
|
||||
margin: 0;
|
||||
float: right;
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
figure {
|
||||
// Add vertical rhythm margins.
|
||||
@include margin-block(0 1);
|
||||
|
||||
&.image {
|
||||
figcaption {
|
||||
padding-block-start: var(--image-padding);
|
||||
|
||||
@include respond-to(s) {
|
||||
display: table-caption;
|
||||
caption-side: bottom;
|
||||
padding-block-start: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@include respond-to(s) {
|
||||
display: table;
|
||||
|
||||
&.left {
|
||||
figcaption {
|
||||
padding-inline-end: var(--image-padding);
|
||||
padding-block-end: var(--image-padding);
|
||||
}
|
||||
}
|
||||
|
||||
&.right {
|
||||
figcaption {
|
||||
padding-inline-start: var(--image-padding);
|
||||
padding-block-end: var(--image-padding);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.podcast {
|
||||
audio {
|
||||
width: 95%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
&.image {
|
||||
// Add vertical rhythm margins.
|
||||
@include margin-block(0 1);
|
||||
}
|
||||
}
|
||||
72
themes/zen/assets/sass/base/links/_links.scss
Normal file
72
themes/zen/assets/sass/base/links/_links.scss
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
// Links
|
||||
//
|
||||
// Hyperlinks are used to allow the user to navigate to other resources or to
|
||||
// download a resource.
|
||||
//
|
||||
// The order of link states are based on Eric Meyer's article:
|
||||
// http://meyerweb.com/eric/thoughts/2007/06/11/who-ordered-the-link-states
|
||||
//
|
||||
// :visited - A link that has already been visited.
|
||||
// :hover - A link that is being hovered over.
|
||||
// :focus - A link that has been given keyboard focus.
|
||||
// :active - A link that is being actively clicked.
|
||||
|
||||
a,
|
||||
%link {
|
||||
color: var(--color-link);
|
||||
}
|
||||
|
||||
// Any element can receive focus, but only links can be visited, so we can
|
||||
// safely lower this selector's specificity. This also ensures visited links
|
||||
// with additional styles won't have their styles overridden.
|
||||
:visited {
|
||||
color: var(--color-link-visited);
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:focus {
|
||||
color: var(--color-link-hover);
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: var(--color-link-active);
|
||||
}
|
||||
|
||||
// Remove underline from links to current page to
|
||||
// indicate that there is no need to click on it.
|
||||
[aria-current] {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.link-nav,
|
||||
%link-nav {
|
||||
a {
|
||||
text-decoration: none;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Inverted links, for dark backgrounds.
|
||||
.link-inverted,
|
||||
%link-inverted {
|
||||
a {
|
||||
color: var(--color-link-inverted);
|
||||
|
||||
&:visited {
|
||||
color: var(--color-link-visited-inverted);
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: var(--color-link-hover-inverted);
|
||||
}
|
||||
|
||||
&:active {
|
||||
color: var(--color-link-active-inverted);
|
||||
}
|
||||
}
|
||||
}
|
||||
31
themes/zen/assets/sass/base/tables/_tables.scss
Normal file
31
themes/zen/assets/sass/base/tables/_tables.scss
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
// Tables
|
||||
//
|
||||
// The `<table>` element displays tabular data in rows, columns, and cells.
|
||||
|
||||
table {
|
||||
// Add vertical rhythm margins.
|
||||
@include margin-block(0 1);
|
||||
// Remove default spacing between table cells.
|
||||
border-collapse: collapse;
|
||||
// Prevent cramped-looking tables
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td,
|
||||
th {
|
||||
// Remove most spacing between table cells.
|
||||
padding: 0;
|
||||
// Align content to top of cells.
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
th {
|
||||
// Align content to bottom of headers.
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
caption,
|
||||
th {
|
||||
// Align all text the same.
|
||||
text-align: start;
|
||||
}
|
||||
71
themes/zen/assets/sass/components/box/_box.scss
Normal file
71
themes/zen/assets/sass/components/box/_box.scss
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
// Box
|
||||
//
|
||||
// A simple box style.
|
||||
//
|
||||
// A block is often styled as a box. However, this design component is
|
||||
// not applied to any blocks by default; it is used as an example of how to
|
||||
// build and document a CSS component.
|
||||
//
|
||||
// "box" is the name of our component, so we define a `.box` class that we can
|
||||
// apply to any HTML element that needs the box styling. We also provide a
|
||||
// `%box` placeholder selector so that we can easily extend the basic box
|
||||
// component with `@extend %box;`.
|
||||
//
|
||||
// Take a look at the source code for this component for more information about
|
||||
// building a good component.
|
||||
//
|
||||
// :hover - The hover/focus styling.
|
||||
// .box--highlight - The "highlight" box variant.
|
||||
|
||||
.box,
|
||||
%box {
|
||||
// Add vertical rhythm margins.
|
||||
@include margin-block(1);
|
||||
@include padding(.5);
|
||||
border: 5px solid var(--color-border);
|
||||
|
||||
// Sass compiles this to the selector: .box__title, %box__title {}
|
||||
// The "__" (double underscore) is part of a BEM naming convention that
|
||||
// indicates the "title" is an _element_ of (a piece of) the "box" component.
|
||||
&__title,
|
||||
.title {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
// Sass compiles this to the selector: .box--highlight, %box--highlight {}
|
||||
// The "--" (double dash) is part of a BEM naming convention that indicates
|
||||
// the "highlight" is a _modifier_, creating a new variation of the standard
|
||||
// "box" component.
|
||||
&--highlight {
|
||||
border-color: var(--color-highlight);
|
||||
}
|
||||
|
||||
&--fit {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
&--gutter {
|
||||
padding-inline: var(--gutters);
|
||||
}
|
||||
|
||||
&--inverted {
|
||||
@extend %link-inverted;
|
||||
background: var(--color-border);
|
||||
color: var(--color-text-bg);
|
||||
|
||||
// Make sure headings etc. also gets inverted.
|
||||
* {
|
||||
color: var(--color-text-bg);
|
||||
}
|
||||
}
|
||||
|
||||
> * {
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
98
themes/zen/assets/sass/components/button/_button.scss
Normal file
98
themes/zen/assets/sass/components/button/_button.scss
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
// Button
|
||||
//
|
||||
// In addition to the default styling of `<button>` and
|
||||
// `<input type="submit|image|reset|button">` elements, the `.button` class and
|
||||
// its variants can apply buttons styles to various elements (like an `<a>`
|
||||
// link).
|
||||
//
|
||||
// :hover - Hover styling.
|
||||
// :active - Depressed button styling.
|
||||
|
||||
.button,
|
||||
%button,
|
||||
button,
|
||||
[type='button'],
|
||||
[type='reset'],
|
||||
[type='submit'] {
|
||||
@extend %button--disabled;
|
||||
// Some styles don't apply to <a> links since they are inline elements by default.
|
||||
display: inline-block;
|
||||
font-family: var(--ff-headings);
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
width: fit-content;
|
||||
margin-right: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
padding: .2rem 1rem;
|
||||
// Improve usability and consistency of cursor style between image-type `input` and others.
|
||||
cursor: pointer;
|
||||
color: var(--color-button-text);
|
||||
background-color: var(--color-button);
|
||||
border: 1px solid var(--color-button);
|
||||
border-radius: var(--radius-s);
|
||||
|
||||
&:hover,
|
||||
&:focus-visible,
|
||||
&:active {
|
||||
// Override any link underlines and color changes.
|
||||
text-decoration: none;
|
||||
color: var(--color-button-text-hover);
|
||||
background-color: var(--color-button-hover);
|
||||
}
|
||||
}
|
||||
|
||||
// Add button variations here.
|
||||
.button,
|
||||
%button {
|
||||
&--small {
|
||||
font-size: var(--fs-xs);
|
||||
margin-right: .5rem;
|
||||
margin-bottom: .5rem;
|
||||
padding: .2rem .75rem;
|
||||
}
|
||||
|
||||
&--alt {
|
||||
color: var(--color-button-text-hover);
|
||||
background-color: var(--color-button-hover);
|
||||
|
||||
&:hover,
|
||||
&:focus-visible,
|
||||
&:active {
|
||||
color: var(--color-button-text);
|
||||
background-color: var(--color-button);
|
||||
}
|
||||
}
|
||||
|
||||
&--outline {
|
||||
color: var(--color-button);
|
||||
background-color: var(--color-button-text);
|
||||
border-color: var(--color-button);
|
||||
|
||||
&:hover,
|
||||
&:focus-visible,
|
||||
&:active {
|
||||
color: var(--color-button-text);
|
||||
background-color: var(--color-button);
|
||||
}
|
||||
}
|
||||
|
||||
&--shadow {
|
||||
&:hover {
|
||||
box-shadow: 2px 2px 5px 1px var(--color-button-hover);
|
||||
}
|
||||
|
||||
&:active {
|
||||
box-shadow: inset 2px 2px 5px 1px var(--color-button);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The disabled variation should always go last, so that it overrides any
|
||||
// other variations.
|
||||
%button--disabled[disabled] {
|
||||
@extend %disabled;
|
||||
background-color: var(--color-grey-extra-light);
|
||||
border: 1px solid var(--color-button-disabled);
|
||||
background-image: none;
|
||||
text-shadow: none;
|
||||
}
|
||||
45
themes/zen/assets/sass/components/cards/_cards.scss
Normal file
45
themes/zen/assets/sass/components/cards/_cards.scss
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
// Cards
|
||||
//
|
||||
// A simple cards style.
|
||||
|
||||
.cards,
|
||||
%cards {
|
||||
@extend %grid-group;
|
||||
// Add vertical rhythm margins.
|
||||
@include margin-block(1);
|
||||
}
|
||||
|
||||
.card,
|
||||
%card {
|
||||
@include padding(.5);
|
||||
border: 1px solid var(--color-border);
|
||||
|
||||
&--highlight {
|
||||
border-color: var(--color-highlight);
|
||||
}
|
||||
|
||||
&--featured {
|
||||
grid-row: span 2;
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
&--gutter {
|
||||
padding-inline: var(--gutters);
|
||||
}
|
||||
|
||||
&--inverted {
|
||||
@extend %link-inverted;
|
||||
background: var(--color-border);
|
||||
color: var(--color-text-bg);
|
||||
}
|
||||
|
||||
> * {
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue