Fix all the build errors
This commit is contained in:
parent
7ba65229b6
commit
34ec240dc0
6 changed files with 63 additions and 27 deletions
|
@ -1,33 +1,26 @@
|
|||
/* spacing.css
|
||||
* Eryn Wells <eryn@erynwells.me>
|
||||
* vim: set sw=2 sts=2:
|
||||
*/
|
||||
{{/*
|
||||
spacing.css
|
||||
Eryn Wells <eryn@erynwells.me>
|
||||
vim: set sw=2 sts=2:
|
||||
*/}}
|
||||
|
||||
{{ $spacingBase := 1 }}
|
||||
{{ $spacingUnit := "em" }}
|
||||
{{ $spacingFactor := 1.618 }}
|
||||
{{- $spacingBase := 1 -}}
|
||||
{{- $spacingUnit := "rem" -}}
|
||||
{{- $spacingFactor := 1.618 -}}
|
||||
|
||||
{{ $scale := (dict
|
||||
"xxs" -3
|
||||
"xs" -2
|
||||
"s" -1
|
||||
"m" 1
|
||||
"l" 2
|
||||
"xl" 3
|
||||
"xxl" 4
|
||||
) }}
|
||||
{{- $scale := partial "size_scale.html" . }}
|
||||
|
||||
:root {
|
||||
{{ range $name, $exponent := $scale }}
|
||||
{{ $value := $spacingBase * (math.Pow $spacingFactor $exponent) }}
|
||||
--spacing-{{ $name }}: {{ $value }}{{ $spacingUnit }};
|
||||
{{ end }}
|
||||
{{- range $scale -}}
|
||||
{{ $value := mul $spacingBase (math.Pow $spacingFactor .Value) }}
|
||||
--spacing-{{ .Name }}: {{ printf "%.3f" $value }}{{ $spacingUnit }};
|
||||
{{- end }}
|
||||
}
|
||||
|
||||
{{ range $name, $exponent := $scale }}
|
||||
/* Spacing utility classes: {{ $name }} */
|
||||
.sp-bls-{{ $name }} { margin-block-start: var(--spacing-{{ $name }}); }
|
||||
.sp-ble-{{ $name }} { margin-block-end: var(--spacing-{{ $name }}); }
|
||||
.sp-ins-{{ $name }} { margin-inline-start: var(--spacing-{{ $name }}); }
|
||||
.sp-ine-{{ $name }} { margin-inline-end: var(--spacing-{{ $name }}); }
|
||||
{{ range $scale }}
|
||||
{{ printf "/* Spacing utility classes: %s */" .Name }}
|
||||
.sp-bls-{{ .Name }} { margin-block-start: var(--spacing-{{ .Name }}); }
|
||||
.sp-ble-{{ .Name }} { margin-block-end: var(--spacing-{{ .Name }}); }
|
||||
.sp-ins-{{ .Name }} { margin-inline-start: var(--spacing-{{ .Name }}); }
|
||||
.sp-ine-{{ .Name }} { margin-inline-end: var(--spacing-{{ .Name }}); }
|
||||
{{ end }}
|
||||
|
|
22
assets/css/typography.css
Normal file
22
assets/css/typography.css
Normal file
|
@ -0,0 +1,22 @@
|
|||
{{/*
|
||||
typography.css
|
||||
Eryn Wells <eryn@erynwells.me>
|
||||
vim: set sw=2 sts=2:
|
||||
*/}}
|
||||
|
||||
{{- $fontSizeBase := 1 -}}
|
||||
{{- $fontSizeUnit := "rem" -}}
|
||||
{{- $fontSizeFactor := 1.200 -}}
|
||||
|
||||
{{- $scale := partial "size_scale.html" . -}}
|
||||
|
||||
:root {
|
||||
{{- range $scale -}}
|
||||
{{ $value := mul $fontSizeBase (math.Pow $fontSizeFactor .Value) }}
|
||||
--font-size-{{ .Name }}: {{ printf "%.3f" $value }}{{ $fontSizeUnit }};
|
||||
{{- end }}
|
||||
}
|
||||
|
||||
{{ range $scale }}
|
||||
.font-size-{{ .Name }} { font-size: var(--font-size-{{ .Name }}); }
|
||||
{{- end }}
|
Loading…
Add table
Add a link
Reference in a new issue