@graupl/graupl 1.0.0-beta.1 → 1.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/devcontainer.json +221 -0
- package/.env +3 -0
- package/.github/workflows/docs.yml +13 -6
- package/.github/workflows/prerelease.yml +125 -0
- package/.github/workflows/release.yml +111 -0
- package/.github/workflows/test.yml +54 -3
- package/.versionrc.cjs +12 -0
- package/.vscode/settings.json +10 -0
- package/CHANGELOG.md +196 -1
- package/build.js +4 -2
- package/combine-at-rules.cjs +61 -0
- package/container/.env +26 -0
- package/container/build/app.dockerfile +41 -0
- package/container/docker-compose.yml +27 -0
- package/dist/css/base/button.css +1 -1
- package/dist/css/base/button.css.map +1 -1
- package/dist/css/base/form.css +1 -1
- package/dist/css/base/form.css.map +1 -1
- package/dist/css/base/link.css +1 -1
- package/dist/css/base/link.css.map +1 -1
- package/dist/css/base/table.css +1 -1
- package/dist/css/base/table.css.map +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/base.css.map +1 -1
- package/dist/css/component/accordion.css +4 -1
- package/dist/css/component/accordion.css.map +1 -1
- package/dist/css/component/alert.css +1 -1
- package/dist/css/component/alert.css.map +1 -1
- package/dist/css/component/card.css +1 -1
- package/dist/css/component/card.css.map +1 -1
- package/dist/css/component/carousel.css +1 -1
- package/dist/css/component/carousel.css.map +1 -1
- package/dist/css/component/input-group.css +1 -1
- package/dist/css/component/input-group.css.map +1 -1
- package/dist/css/component/list.css +2 -0
- package/dist/css/component/list.css.map +1 -0
- package/dist/css/component/menu.css +1 -1
- package/dist/css/component/menu.css.map +1 -1
- package/dist/css/component/navigation.css +1 -1
- package/dist/css/component/navigation.css.map +1 -1
- package/dist/css/component.css +4 -1
- package/dist/css/component.css.map +1 -1
- package/dist/css/graupl.css +4 -1
- package/dist/css/graupl.css.map +1 -1
- package/dist/css/init.css.map +1 -1
- package/dist/css/layout/columns.css +1 -1
- package/dist/css/layout/columns.css.map +1 -1
- package/dist/css/layout/container.css +1 -1
- package/dist/css/layout/container.css.map +1 -1
- package/dist/css/layout/flex-columns.css +1 -1
- package/dist/css/layout/flex-columns.css.map +1 -1
- package/dist/css/layout.css +4 -1
- package/dist/css/layout.css.map +1 -1
- package/dist/css/normalize.css +1 -1
- package/dist/css/normalize.css.map +1 -1
- package/dist/css/state/focus.css +1 -1
- package/dist/css/state/focus.css.map +1 -1
- package/dist/css/state.css +1 -1
- package/dist/css/state.css.map +1 -1
- package/dist/css/theme/color.css +1 -1
- package/dist/css/theme/color.css.map +1 -1
- package/dist/css/theme/typography.css +1 -1
- package/dist/css/theme/typography.css.map +1 -1
- package/dist/css/theme.css +1 -1
- package/dist/css/theme.css.map +1 -1
- package/dist/css/utilities/alignment.css +1 -1
- package/dist/css/utilities/alignment.css.map +1 -1
- package/dist/css/utilities/background.css +2 -0
- package/dist/css/utilities/background.css.map +1 -0
- package/dist/css/utilities/border.css +2 -0
- package/dist/css/utilities/border.css.map +1 -0
- package/dist/css/utilities/color.css +1 -1
- package/dist/css/utilities/color.css.map +1 -1
- package/dist/css/utilities/container.css +2 -0
- package/dist/css/utilities/container.css.map +1 -0
- package/dist/css/utilities/display.css +1 -1
- package/dist/css/utilities/display.css.map +1 -1
- package/dist/css/utilities/flex.css +1 -1
- package/dist/css/utilities/flex.css.map +1 -1
- package/dist/css/utilities/gradient.css +2 -0
- package/dist/css/utilities/gradient.css.map +1 -0
- package/dist/css/utilities/height.css +1 -1
- package/dist/css/utilities/height.css.map +1 -1
- package/dist/css/utilities/inset.css +1 -1
- package/dist/css/utilities/inset.css.map +1 -1
- package/dist/css/utilities/justification.css +1 -1
- package/dist/css/utilities/justification.css.map +1 -1
- package/dist/css/utilities/list.css +1 -1
- package/dist/css/utilities/list.css.map +1 -1
- package/dist/css/utilities/order.css +1 -1
- package/dist/css/utilities/order.css.map +1 -1
- package/dist/css/utilities/position.css +2 -0
- package/dist/css/utilities/position.css.map +1 -0
- package/dist/css/utilities/ratio.css +1 -1
- package/dist/css/utilities/ratio.css.map +1 -1
- package/dist/css/utilities/spacing.css +1 -1
- package/dist/css/utilities/spacing.css.map +1 -1
- package/dist/css/utilities/typography.css +1 -1
- package/dist/css/utilities/typography.css.map +1 -1
- package/dist/css/utilities/visibility.css +1 -1
- package/dist/css/utilities/visibility.css.map +1 -1
- package/dist/css/utilities/visually-hidden.css +2 -0
- package/dist/css/utilities/visually-hidden.css.map +1 -0
- package/dist/css/utilities/width.css +1 -1
- package/dist/css/utilities/width.css.map +1 -1
- package/dist/css/utilities/z-index.css +2 -0
- package/dist/css/utilities/z-index.css.map +1 -0
- package/dist/css/utilities.css +1 -1
- package/dist/css/utilities.css.map +1 -1
- package/dist/js/graupl.cjs.js +5 -3
- package/dist/js/graupl.esm.js +1305 -206
- package/dist/js/graupl.iife.js +5 -3
- package/docs/.vitepress/config.js +31 -1
- package/docs/.vitepress/theme/custom.scss +16 -16
- package/docs/compiling-graupl.md +6 -5
- package/docs/utilities/alignment.md +411 -0
- package/docs/utilities/background.md +192 -0
- package/docs/utilities/border.md +268 -0
- package/docs/utilities/color.md +348 -0
- package/docs/utilities/container.md +3 -0
- package/docs/utilities/display.md +3 -0
- package/docs/utilities/flex.md +3 -0
- package/docs/utilities/gradient.md +3 -0
- package/docs/utilities/height.md +3 -0
- package/docs/utilities/inset.md +3 -0
- package/docs/utilities/justification.md +3 -0
- package/docs/utilities/list.md +3 -0
- package/docs/utilities/order.md +3 -0
- package/docs/utilities/position.md +3 -0
- package/docs/utilities/ratio.md +3 -0
- package/docs/utilities/responsive-classes.md +3 -0
- package/docs/utilities/spacing.md +3 -0
- package/docs/utilities/typography.md +3 -0
- package/docs/utilities/visibility.md +3 -0
- package/docs/utilities/visually-hidden.md +3 -0
- package/docs/utilities/width.md +3 -0
- package/docs/utilities/z-index.md +3 -0
- package/favicon.ico +0 -0
- package/index.html +418 -55
- package/logo.svg +296 -0
- package/package.json +33 -37
- package/packages/core/build.js +9 -0
- package/packages/core/dist/css/base/button.css +2 -0
- package/packages/core/dist/css/base/button.css.map +1 -0
- package/packages/core/dist/css/base/form.css +2 -0
- package/packages/core/dist/css/base/form.css.map +1 -0
- package/packages/core/dist/css/base/link.css +2 -0
- package/packages/core/dist/css/base/link.css.map +1 -0
- package/packages/core/dist/css/base/table.css +2 -0
- package/packages/core/dist/css/base/table.css.map +1 -0
- package/packages/core/dist/css/base.css +2 -0
- package/packages/core/dist/css/base.css.map +1 -0
- package/packages/core/dist/css/component/accordion.css +5 -0
- package/packages/core/dist/css/component/accordion.css.map +1 -0
- package/packages/core/dist/css/component/alert.css +2 -0
- package/packages/core/dist/css/component/alert.css.map +1 -0
- package/packages/core/dist/css/component/card.css +2 -0
- package/packages/core/dist/css/component/card.css.map +1 -0
- package/packages/core/dist/css/component/carousel.css +2 -0
- package/packages/core/dist/css/component/carousel.css.map +1 -0
- package/packages/core/dist/css/component/input-group.css +2 -0
- package/packages/core/dist/css/component/input-group.css.map +1 -0
- package/packages/core/dist/css/component/list.css +2 -0
- package/packages/core/dist/css/component/list.css.map +1 -0
- package/packages/core/dist/css/component/menu.css +2 -0
- package/packages/core/dist/css/component/menu.css.map +1 -0
- package/packages/core/dist/css/component/navigation.css +2 -0
- package/packages/core/dist/css/component/navigation.css.map +1 -0
- package/packages/core/dist/css/component.css +5 -0
- package/packages/core/dist/css/component.css.map +1 -0
- package/packages/core/dist/css/graupl.css +5 -0
- package/packages/core/dist/css/graupl.css.map +1 -0
- package/{src/scss/_init.scss → packages/core/dist/css/init.css} +1 -2
- package/packages/core/dist/css/init.css.map +1 -0
- package/packages/core/dist/css/layout/columns.css +2 -0
- package/packages/core/dist/css/layout/columns.css.map +1 -0
- package/packages/core/dist/css/layout/container.css +2 -0
- package/packages/core/dist/css/layout/container.css.map +1 -0
- package/packages/core/dist/css/layout/flex-columns.css +2 -0
- package/packages/core/dist/css/layout/flex-columns.css.map +1 -0
- package/packages/core/dist/css/layout.css +5 -0
- package/packages/core/dist/css/layout.css.map +1 -0
- package/packages/core/dist/css/normalize.css +2 -0
- package/packages/core/dist/css/normalize.css.map +1 -0
- package/packages/core/dist/css/state/focus.css +2 -0
- package/packages/core/dist/css/state/focus.css.map +1 -0
- package/packages/core/dist/css/state.css +2 -0
- package/packages/core/dist/css/state.css.map +1 -0
- package/packages/core/dist/css/theme/color.css +2 -0
- package/packages/core/dist/css/theme/color.css.map +1 -0
- package/packages/core/dist/css/theme/typography.css +2 -0
- package/packages/core/dist/css/theme/typography.css.map +1 -0
- package/packages/core/dist/css/theme.css +2 -0
- package/packages/core/dist/css/theme.css.map +1 -0
- package/packages/core/dist/css/utilities/alignment.css +2 -0
- package/packages/core/dist/css/utilities/alignment.css.map +1 -0
- package/packages/core/dist/css/utilities/background.css +2 -0
- package/packages/core/dist/css/utilities/background.css.map +1 -0
- package/packages/core/dist/css/utilities/border.css +2 -0
- package/packages/core/dist/css/utilities/border.css.map +1 -0
- package/packages/core/dist/css/utilities/color.css +2 -0
- package/packages/core/dist/css/utilities/color.css.map +1 -0
- package/packages/core/dist/css/utilities/container.css +2 -0
- package/packages/core/dist/css/utilities/container.css.map +1 -0
- package/packages/core/dist/css/utilities/display.css +2 -0
- package/packages/core/dist/css/utilities/display.css.map +1 -0
- package/packages/core/dist/css/utilities/flex.css +2 -0
- package/packages/core/dist/css/utilities/flex.css.map +1 -0
- package/packages/core/dist/css/utilities/gradient.css +2 -0
- package/packages/core/dist/css/utilities/gradient.css.map +1 -0
- package/packages/core/dist/css/utilities/height.css +2 -0
- package/packages/core/dist/css/utilities/height.css.map +1 -0
- package/packages/core/dist/css/utilities/inset.css +2 -0
- package/packages/core/dist/css/utilities/inset.css.map +1 -0
- package/packages/core/dist/css/utilities/justification.css +2 -0
- package/packages/core/dist/css/utilities/justification.css.map +1 -0
- package/packages/core/dist/css/utilities/list.css +2 -0
- package/packages/core/dist/css/utilities/list.css.map +1 -0
- package/packages/core/dist/css/utilities/order.css +2 -0
- package/packages/core/dist/css/utilities/order.css.map +1 -0
- package/packages/core/dist/css/utilities/position.css +2 -0
- package/packages/core/dist/css/utilities/position.css.map +1 -0
- package/packages/core/dist/css/utilities/ratio.css +2 -0
- package/packages/core/dist/css/utilities/ratio.css.map +1 -0
- package/packages/core/dist/css/utilities/spacing.css +2 -0
- package/packages/core/dist/css/utilities/spacing.css.map +1 -0
- package/packages/core/dist/css/utilities/typography.css +2 -0
- package/packages/core/dist/css/utilities/typography.css.map +1 -0
- package/packages/core/dist/css/utilities/visibility.css +2 -0
- package/packages/core/dist/css/utilities/visibility.css.map +1 -0
- package/packages/core/dist/css/utilities/visually-hidden.css +2 -0
- package/packages/core/dist/css/utilities/visually-hidden.css.map +1 -0
- package/packages/core/dist/css/utilities/width.css +2 -0
- package/packages/core/dist/css/utilities/width.css.map +1 -0
- package/packages/core/dist/css/utilities/z-index.css +2 -0
- package/packages/core/dist/css/utilities/z-index.css.map +1 -0
- package/packages/core/dist/css/utilities.css +2 -0
- package/packages/core/dist/css/utilities.css.map +1 -0
- package/packages/core/package.json +58 -0
- package/packages/core/scss/base/button.scss +3 -0
- package/packages/core/scss/base/form.scss +3 -0
- package/packages/core/scss/base/link.scss +3 -0
- package/packages/core/scss/base/table.scss +3 -0
- package/packages/core/scss/base.scss +3 -0
- package/packages/core/scss/component/accordion.scss +3 -0
- package/packages/core/scss/component/alert.scss +3 -0
- package/packages/core/scss/component/card.scss +3 -0
- package/packages/core/scss/component/carousel.scss +3 -0
- package/packages/core/scss/component/input-group.scss +3 -0
- package/packages/core/scss/component/list.scss +3 -0
- package/packages/core/scss/component/menu.scss +3 -0
- package/packages/core/scss/component/navigation.scss +3 -0
- package/packages/core/scss/component.scss +3 -0
- package/packages/core/scss/graupl.scss +3 -0
- package/packages/core/scss/init.scss +3 -0
- package/packages/core/scss/layout/columns.scss +3 -0
- package/packages/core/scss/layout/container.scss +3 -0
- package/packages/core/scss/layout/flex-columns.scss +3 -0
- package/packages/core/scss/layout.scss +3 -0
- package/packages/core/scss/normalize.scss +3 -0
- package/packages/core/scss/state/focus.scss +3 -0
- package/packages/core/scss/state.scss +3 -0
- package/packages/core/scss/theme/color.scss +3 -0
- package/packages/core/scss/theme/typography.scss +3 -0
- package/packages/core/scss/theme.scss +3 -0
- package/packages/core/scss/utilities/alignment.scss +3 -0
- package/packages/core/scss/utilities/background.scss +3 -0
- package/packages/core/scss/utilities/border.scss +3 -0
- package/packages/core/scss/utilities/color.scss +3 -0
- package/packages/core/scss/utilities/container.scss +3 -0
- package/packages/core/scss/utilities/display.scss +3 -0
- package/packages/core/scss/utilities/flex.scss +3 -0
- package/packages/core/scss/utilities/gradient.scss +3 -0
- package/packages/core/scss/utilities/height.scss +3 -0
- package/packages/core/scss/utilities/inset.scss +3 -0
- package/packages/core/scss/utilities/justification.scss +3 -0
- package/packages/core/scss/utilities/list.scss +3 -0
- package/packages/core/scss/utilities/order.scss +3 -0
- package/{scss/utilities/postion.scss → packages/core/scss/utilities/position.scss} +1 -1
- package/packages/core/scss/utilities/ratio.scss +3 -0
- package/packages/core/scss/utilities/spacing.scss +3 -0
- package/packages/core/scss/utilities/typography.scss +3 -0
- package/packages/core/scss/utilities/visibility.scss +3 -0
- package/packages/core/scss/utilities/visually-hidden.scss +3 -0
- package/packages/core/scss/utilities/width.scss +3 -0
- package/packages/core/scss/utilities/z-index.scss +3 -0
- package/packages/core/scss/utilities.scss +3 -0
- package/{src → packages/core/src}/scss/_defaults.scss +59 -11
- package/{src → packages/core/src}/scss/_index.scss +1 -1
- package/packages/core/src/scss/_init.scss +6 -0
- package/{src → packages/core/src}/scss/_normalize.scss +1 -1
- package/{src → packages/core/src}/scss/_variables.scss +43 -1
- package/{src → packages/core/src}/scss/base/_index.scss +1 -1
- package/{src → packages/core/src}/scss/base/button/_defaults.scss +13 -24
- package/packages/core/src/scss/base/button/_index.scss +206 -0
- package/packages/core/src/scss/base/button/_mixins.scss +104 -0
- package/{src → packages/core/src}/scss/base/button/_variables.scss +108 -32
- package/{src → packages/core/src}/scss/base/form/_defaults.scss +8 -1
- package/packages/core/src/scss/base/form/_index.scss +227 -0
- package/packages/core/src/scss/base/form/_variables.scss +245 -0
- package/packages/core/src/scss/base/link/_defaults.scss +35 -0
- package/packages/core/src/scss/base/link/_index.scss +245 -0
- package/{src → packages/core/src}/scss/base/link/_variables.scss +148 -40
- package/packages/core/src/scss/base/table/_defaults.scss +68 -0
- package/packages/core/src/scss/base/table/_index.scss +314 -0
- package/packages/core/src/scss/base/table/_variables.scss +309 -0
- package/{src → packages/core/src}/scss/component/_index.scss +2 -1
- package/{src → packages/core/src}/scss/component/accordion/_defaults.scss +1 -1
- package/{src → packages/core/src}/scss/component/accordion/_index.scss +73 -55
- package/{src → packages/core/src}/scss/component/accordion/_variables.scss +68 -28
- package/{src → packages/core/src}/scss/component/alert/_defaults.scss +1 -1
- package/{src → packages/core/src}/scss/component/alert/_index.scss +45 -44
- package/{src → packages/core/src}/scss/component/alert/_variables.scss +54 -24
- package/{src → packages/core/src}/scss/component/card/_defaults.scss +1 -1
- package/{src → packages/core/src}/scss/component/card/_index.scss +47 -13
- package/{src → packages/core/src}/scss/component/card/_variables.scss +54 -24
- package/{src → packages/core/src}/scss/component/carousel/_defaults.scss +1 -1
- package/{src → packages/core/src}/scss/component/carousel/_index.scss +29 -25
- package/{src → packages/core/src}/scss/component/carousel/_variables.scss +1 -1
- package/{src → packages/core/src}/scss/component/input-group/_defaults.scss +1 -1
- package/{src → packages/core/src}/scss/component/input-group/_index.scss +2 -2
- package/{src → packages/core/src}/scss/component/input-group/_variables.scss +1 -1
- package/{src/scss/utilities/order → packages/core/src/scss/component/list}/_defaults.scss +7 -14
- package/packages/core/src/scss/component/list/_index.scss +52 -0
- package/packages/core/src/scss/component/list/_variables.scss +236 -0
- package/{src → packages/core/src}/scss/component/menu/_defaults.scss +11 -20
- package/{src → packages/core/src}/scss/component/menu/_index.scss +9 -6
- package/{src → packages/core/src}/scss/component/menu/_variables.scss +199 -57
- package/packages/core/src/scss/component/navigation/_defaults.scss +23 -0
- package/{src → packages/core/src}/scss/component/navigation/_index.scss +3 -2
- package/{src → packages/core/src}/scss/component/navigation/_variables.scss +79 -26
- package/packages/core/src/scss/functions/_container.scss +38 -0
- package/packages/core/src/scss/functions/_important.scss +36 -0
- package/{src → packages/core/src}/scss/functions/_screen.scss +9 -1
- package/{src → packages/core/src}/scss/functions/_theme.scss +2 -2
- package/packages/core/src/scss/functions/_utility.scss +28 -0
- package/{src → packages/core/src}/scss/layout/_index.scss +1 -1
- package/{src → packages/core/src}/scss/layout/columns/_defaults.scss +9 -4
- package/packages/core/src/scss/layout/columns/_index.scss +137 -0
- package/{src → packages/core/src}/scss/layout/columns/_variables.scss +6 -2
- package/packages/core/src/scss/layout/container/_defaults.scss +35 -0
- package/packages/core/src/scss/layout/container/_index.scss +628 -0
- package/packages/core/src/scss/layout/container/_variables.scss +114 -0
- package/packages/core/src/scss/layout/flex-columns/_defaults.scss +28 -0
- package/packages/core/src/scss/layout/flex-columns/_index.scss +184 -0
- package/{src → packages/core/src}/scss/layout/flex-columns/_variables.scss +5 -1
- package/{src → packages/core/src}/scss/mixins/_animation.scss +1 -1
- package/packages/core/src/scss/mixins/_container.scss +80 -0
- package/{src → packages/core/src}/scss/mixins/_layer.scss +6 -2
- package/{src → packages/core/src}/scss/mixins/_screen.scss +25 -4
- package/packages/core/src/scss/mixins/_state.scss +18 -0
- package/packages/core/src/scss/mixins/_theme.scss +15 -0
- package/packages/core/src/scss/mixins/_utility.scss +185 -0
- package/packages/core/src/scss/mixins/_visually-hidden.scss +30 -0
- package/packages/core/src/scss/state/_index.scss +3 -0
- package/{src → packages/core/src}/scss/state/focus/_defaults.scss +1 -2
- package/packages/core/src/scss/state/focus/_index.scss +42 -0
- package/packages/core/src/scss/state/focus/_mixins.scss +13 -0
- package/{src → packages/core/src}/scss/state/focus/_variables.scss +16 -10
- package/{src → packages/core/src}/scss/theme/_index.scss +1 -1
- package/{src → packages/core/src}/scss/theme/color/_defaults.scss +1 -1
- package/{src → packages/core/src}/scss/theme/color/_index.scss +5 -5
- package/{src → packages/core/src}/scss/theme/color/_variables.scss +5 -1
- package/{src → packages/core/src}/scss/theme/typography/_defaults.scss +1 -1
- package/{src → packages/core/src}/scss/theme/typography/_index.scss +10 -1
- package/{src → packages/core/src}/scss/theme/typography/_variables.scss +19 -2
- package/{src → packages/core/src}/scss/utilities/_index.scss +7 -1
- package/packages/core/src/scss/utilities/_template/_defaults.scss +41 -0
- package/packages/core/src/scss/utilities/_template/_index.scss +171 -0
- package/{src/scss/utilities/alignment → packages/core/src/scss/utilities/_template}/_variables.scss +1 -1
- package/{src → packages/core/src}/scss/utilities/alignment/_defaults.scss +21 -7
- package/packages/core/src/scss/utilities/alignment/_index.scss +336 -0
- package/{src/scss/utilities/display → packages/core/src/scss/utilities/alignment}/_variables.scss +1 -1
- package/packages/core/src/scss/utilities/background/_defaults.scss +122 -0
- package/packages/core/src/scss/utilities/background/_index.scss +634 -0
- package/packages/core/src/scss/utilities/background/_variables.scss +6 -0
- package/packages/core/src/scss/utilities/border/_defaults.scss +73 -0
- package/packages/core/src/scss/utilities/border/_index.scss +558 -0
- package/{src/scss/utilities/list → packages/core/src/scss/utilities/border}/_variables.scss +1 -1
- package/packages/core/src/scss/utilities/color/_defaults.scss +49 -0
- package/packages/core/src/scss/utilities/color/_index.scss +469 -0
- package/{src/scss/utilities/flex → packages/core/src/scss/utilities/color}/_variables.scss +1 -1
- package/packages/core/src/scss/utilities/container/_defaults.scss +40 -0
- package/packages/core/src/scss/utilities/container/_index.scss +174 -0
- package/packages/core/src/scss/utilities/container/_variables.scss +6 -0
- package/packages/core/src/scss/utilities/display/_defaults.scss +47 -0
- package/packages/core/src/scss/utilities/display/_index.scss +184 -0
- package/{src/scss/utilities/inset → packages/core/src/scss/utilities/display}/_variables.scss +1 -1
- package/packages/core/src/scss/utilities/flex/_defaults.scss +99 -0
- package/packages/core/src/scss/utilities/flex/_index.scss +486 -0
- package/{src/scss/utilities/color → packages/core/src/scss/utilities/flex}/_variables.scss +1 -1
- package/packages/core/src/scss/utilities/gradient/_defaults.scss +70 -0
- package/packages/core/src/scss/utilities/gradient/_index.scss +696 -0
- package/packages/core/src/scss/utilities/gradient/_variables.scss +29 -0
- package/packages/core/src/scss/utilities/height/_defaults.scss +54 -0
- package/packages/core/src/scss/utilities/height/_index.scss +525 -0
- package/packages/core/src/scss/utilities/height/_variables.scss +6 -0
- package/packages/core/src/scss/utilities/inset/_defaults.scss +55 -0
- package/packages/core/src/scss/utilities/inset/_index.scss +258 -0
- package/packages/core/src/scss/utilities/inset/_variables.scss +6 -0
- package/{src → packages/core/src}/scss/utilities/justification/_defaults.scss +21 -7
- package/packages/core/src/scss/utilities/justification/_index.scss +333 -0
- package/packages/core/src/scss/utilities/justification/_variables.scss +6 -0
- package/packages/core/src/scss/utilities/list/_defaults.scss +53 -0
- package/packages/core/src/scss/utilities/list/_index.scss +253 -0
- package/packages/core/src/scss/utilities/list/_variables.scss +6 -0
- package/packages/core/src/scss/utilities/order/_defaults.scss +36 -0
- package/packages/core/src/scss/utilities/order/_index.scss +246 -0
- package/packages/core/src/scss/utilities/order/_variables.scss +6 -0
- package/packages/core/src/scss/utilities/position/_defaults.scss +41 -0
- package/packages/core/src/scss/utilities/position/_index.scss +178 -0
- package/{src/scss/utilities/height → packages/core/src/scss/utilities/position}/_variables.scss +1 -1
- package/packages/core/src/scss/utilities/ratio/_defaults.scss +42 -0
- package/packages/core/src/scss/utilities/ratio/_index.scss +188 -0
- package/{src → packages/core/src}/scss/utilities/ratio/_variables.scss +1 -1
- package/{src → packages/core/src}/scss/utilities/spacing/_defaults.scss +19 -4
- package/packages/core/src/scss/utilities/spacing/_index.scss +970 -0
- package/packages/core/src/scss/utilities/spacing/_variables.scss +6 -0
- package/packages/core/src/scss/utilities/typography/_defaults.scss +58 -0
- package/packages/core/src/scss/utilities/typography/_index.scss +1089 -0
- package/packages/core/src/scss/utilities/typography/_variables.scss +6 -0
- package/packages/core/src/scss/utilities/visibility/_defaults.scss +39 -0
- package/packages/core/src/scss/utilities/visibility/_index.scss +173 -0
- package/packages/core/src/scss/utilities/visibility/_variables.scss +6 -0
- package/packages/core/src/scss/utilities/visually-hidden/_defaults.scss +29 -0
- package/packages/core/src/scss/utilities/visually-hidden/_index.scss +189 -0
- package/packages/core/src/scss/utilities/visually-hidden/_variables.scss +6 -0
- package/packages/core/src/scss/utilities/width/_defaults.scss +54 -0
- package/packages/core/src/scss/utilities/width/_index.scss +525 -0
- package/packages/core/src/scss/utilities/width/_variables.scss +6 -0
- package/packages/core/src/scss/utilities/z-index/_defaults.scss +40 -0
- package/packages/core/src/scss/utilities/z-index/_index.scss +173 -0
- package/packages/core/src/scss/utilities/z-index/_variables.scss +6 -0
- package/packages/core/vite.config.js +28 -0
- package/packages/icons/dist/css/base/button.css +2 -0
- package/packages/icons/dist/css/base/button.css.map +1 -0
- package/packages/icons/dist/css/base/link.css +2 -0
- package/packages/icons/dist/css/base/link.css.map +1 -0
- package/packages/icons/dist/css/base.css +2 -0
- package/packages/icons/dist/css/base.css.map +1 -0
- package/packages/icons/dist/css/component/icon.css +2 -0
- package/packages/icons/dist/css/component/icon.css.map +1 -0
- package/packages/icons/dist/css/component.css +2 -0
- package/packages/icons/dist/css/component.css.map +1 -0
- package/packages/icons/dist/css/icon.css +2 -0
- package/packages/icons/dist/css/icon.css.map +1 -0
- package/packages/icons/package.json +48 -0
- package/packages/icons/scss/base/button.scss +3 -0
- package/packages/icons/scss/base/link.scss +3 -0
- package/packages/icons/scss/base.scss +3 -0
- package/packages/icons/scss/component/icon.scss +3 -0
- package/packages/icons/scss/component.scss +3 -0
- package/packages/icons/scss/icon.scss +3 -0
- package/packages/icons/src/scss/_index.scss +4 -0
- package/packages/icons/src/scss/base/_index.scss +4 -0
- package/packages/icons/src/scss/base/button/_defaults.scss +7 -0
- package/packages/icons/src/scss/base/button/_index.scss +58 -0
- package/packages/icons/src/scss/base/button/_variables.scss +7 -0
- package/packages/icons/src/scss/base/link/_defaults.scss +7 -0
- package/packages/icons/src/scss/base/link/_index.scss +58 -0
- package/packages/icons/src/scss/base/link/_variables.scss +7 -0
- package/packages/icons/src/scss/component/_index.scss +3 -0
- package/packages/icons/src/scss/component/icon/_defaults.scss +30 -0
- package/packages/icons/src/scss/component/icon/_index.scss +60 -0
- package/packages/icons/src/scss/component/icon/_mixins.scss +62 -0
- package/packages/icons/src/scss/component/icon/_variables.scss +24 -0
- package/postcss.config.cjs +2 -3
- package/scss/base/button.scss +1 -1
- package/scss/base/form.scss +1 -1
- package/scss/base/link.scss +1 -1
- package/scss/base/table.scss +1 -1
- package/scss/base.scss +1 -1
- package/scss/component/accordion.scss +1 -1
- package/scss/component/alert.scss +1 -1
- package/scss/component/card.scss +1 -1
- package/scss/component/carousel.scss +1 -1
- package/scss/component/input-group.scss +1 -1
- package/scss/component/list.scss +3 -0
- package/scss/component/menu.scss +1 -1
- package/scss/component/navigation.scss +1 -1
- package/scss/component.scss +1 -1
- package/scss/graupl.scss +1 -1
- package/scss/init.scss +1 -1
- package/scss/layout/columns.scss +1 -1
- package/scss/layout/container.scss +1 -1
- package/scss/layout/flex-columns.scss +1 -1
- package/scss/layout.scss +1 -1
- package/scss/normalize.scss +1 -1
- package/scss/state/focus.scss +1 -1
- package/scss/state.scss +1 -1
- package/scss/theme/color.scss +1 -1
- package/scss/theme/typography.scss +1 -1
- package/scss/theme.scss +1 -1
- package/scss/utilities/alignment.scss +1 -1
- package/scss/utilities/background.scss +3 -0
- package/scss/utilities/border.scss +3 -0
- package/scss/utilities/color.scss +1 -1
- package/scss/utilities/container.scss +3 -0
- package/scss/utilities/display.scss +1 -1
- package/scss/utilities/flex.scss +1 -1
- package/scss/utilities/gradient.scss +3 -0
- package/scss/utilities/height.scss +1 -1
- package/scss/utilities/inset.scss +1 -1
- package/scss/utilities/justification.scss +1 -1
- package/scss/utilities/list.scss +1 -1
- package/scss/utilities/order.scss +1 -1
- package/scss/utilities/position.scss +3 -0
- package/scss/utilities/ratio.scss +1 -1
- package/scss/utilities/spacing.scss +1 -1
- package/scss/utilities/typography.scss +1 -1
- package/scss/utilities/visibility.scss +1 -1
- package/scss/utilities/visually-hidden.scss +3 -0
- package/scss/utilities/width.scss +1 -1
- package/scss/utilities/z-index.scss +3 -0
- package/scss/utilities.scss +1 -1
- package/stylelint.config.js +1 -0
- package/vite.config.js +6 -35
- package/dist/css/utilities/postion.css +0 -2
- package/dist/css/utilities/postion.css.map +0 -1
- package/dist/js/component/accordion.cjs.js +0 -3
- package/dist/js/component/accordion.esm.js +0 -1289
- package/dist/js/component/accordion.iife.js +0 -3
- package/dist/js/component/alert.cjs.js +0 -3
- package/dist/js/component/alert.esm.js +0 -529
- package/dist/js/component/alert.iife.js +0 -3
- package/dist/js/component/carousel.cjs.js +0 -3
- package/dist/js/component/carousel.esm.js +0 -1110
- package/dist/js/component/carousel.iife.js +0 -3
- package/src/scss/base/button/_index.scss +0 -107
- package/src/scss/base/button/_mixins.scss +0 -166
- package/src/scss/base/form/_index.scss +0 -93
- package/src/scss/base/form/_variables.scss +0 -153
- package/src/scss/base/link/_defaults.scss +0 -50
- package/src/scss/base/link/_index.scss +0 -134
- package/src/scss/base/table/_defaults.scss +0 -53
- package/src/scss/base/table/_index.scss +0 -121
- package/src/scss/base/table/_variables.scss +0 -135
- package/src/scss/component/navigation/_defaults.scss +0 -29
- package/src/scss/functions/_important.scss +0 -13
- package/src/scss/layout/columns/_index.scss +0 -58
- package/src/scss/layout/container/_defaults.scss +0 -17
- package/src/scss/layout/container/_index.scss +0 -41
- package/src/scss/layout/container/_variables.scss +0 -50
- package/src/scss/layout/flex-columns/_defaults.scss +0 -18
- package/src/scss/layout/flex-columns/_index.scss +0 -80
- package/src/scss/mixins/_utility.scss +0 -30
- package/src/scss/mixins/_visually-hidden.scss +0 -20
- package/src/scss/state/_index.scss +0 -3
- package/src/scss/state/focus/_index.scss +0 -13
- package/src/scss/state/focus/_mixins.scss +0 -15
- package/src/scss/utilities/alignment/_index.scss +0 -75
- package/src/scss/utilities/color/_defaults.scss +0 -35
- package/src/scss/utilities/color/_index.scss +0 -91
- package/src/scss/utilities/display/_defaults.scss +0 -32
- package/src/scss/utilities/display/_index.scss +0 -61
- package/src/scss/utilities/flex/_defaults.scss +0 -63
- package/src/scss/utilities/flex/_index.scss +0 -71
- package/src/scss/utilities/height/_defaults.scss +0 -41
- package/src/scss/utilities/height/_index.scss +0 -98
- package/src/scss/utilities/inset/_defaults.scss +0 -41
- package/src/scss/utilities/inset/_index.scss +0 -37
- package/src/scss/utilities/justification/_index.scss +0 -75
- package/src/scss/utilities/justification/_variables.scss +0 -6
- package/src/scss/utilities/list/_defaults.scss +0 -39
- package/src/scss/utilities/list/_index.scss +0 -56
- package/src/scss/utilities/order/_index.scss +0 -63
- package/src/scss/utilities/order/_variables.scss +0 -6
- package/src/scss/utilities/position/_defaults.scss +0 -26
- package/src/scss/utilities/position/_index.scss +0 -37
- package/src/scss/utilities/position/_variables.scss +0 -6
- package/src/scss/utilities/ratio/_defaults.scss +0 -28
- package/src/scss/utilities/ratio/_index.scss +0 -52
- package/src/scss/utilities/spacing/_index.scss +0 -169
- package/src/scss/utilities/spacing/_variables.scss +0 -6
- package/src/scss/utilities/typography/_defaults.scss +0 -30
- package/src/scss/utilities/typography/_index.scss +0 -224
- package/src/scss/utilities/typography/_variables.scss +0 -6
- package/src/scss/utilities/visibility/_defaults.scss +0 -25
- package/src/scss/utilities/visibility/_index.scss +0 -36
- package/src/scss/utilities/visibility/_variables.scss +0 -6
- package/src/scss/utilities/width/_defaults.scss +0 -41
- package/src/scss/utilities/width/_index.scss +0 -98
- package/src/scss/utilities/width/_variables.scss +0 -6
- /package/{src → packages/core/src}/js/accordion/Accordion.js +0 -0
- /package/{src → packages/core/src}/js/accordion/AccordionItem.js +0 -0
- /package/{src → packages/core/src}/js/accordion/index.js +0 -0
- /package/{src → packages/core/src}/js/alert/Alert.js +0 -0
- /package/{src → packages/core/src}/js/alert/index.js +0 -0
- /package/{src → packages/core/src}/js/carousel/Carousel.js +0 -0
- /package/{src → packages/core/src}/js/carousel/index.js +0 -0
- /package/{src → packages/core/src}/js/domHelpers.js +0 -0
- /package/{src → packages/core/src}/js/eventHandlers.js +0 -0
- /package/{src → packages/core/src}/js/navigation/index.js +0 -0
- /package/{src → packages/core/src}/js/storage.js +0 -0
- /package/{src → packages/core/src}/js/validate.js +0 -0
|
@@ -0,0 +1,1089 @@
|
|
|
1
|
+
// @graupl/core typography utilities styles.
|
|
2
|
+
//
|
|
3
|
+
// This file generates the typography utility classes provided by Graupl.
|
|
4
|
+
//
|
|
5
|
+
// The following classes are generated by default:
|
|
6
|
+
// - `.text-xs`: Sets the font size property to Graupl's extra small font size.
|
|
7
|
+
// - `.text-sm`: Sets the font size property to Graupl's small font size.
|
|
8
|
+
// - `.text-base`: Sets the font size property to Graupl's base font size.
|
|
9
|
+
// - `.text-lg`: Sets the font size property to Graupl's large font size.
|
|
10
|
+
// - `.text-xl`: Sets the font size property to Graupl's extra large font size.
|
|
11
|
+
// - `.text-2xl`: Sets the font size property to Graupl's 2 extra large font size.
|
|
12
|
+
// - `.text-3xl`: Sets the font size property to Graupl's 3 extra large font size.
|
|
13
|
+
// - `.text-4xl`: Sets the font size property to Graupl's 4 extra large font size.
|
|
14
|
+
// - `.text-5xl`: Sets the font size property to Graupl's 5 extra large font size.
|
|
15
|
+
// - `.text-paragraph`: Sets the font size, margin, font weight, and line height properties to Graupl's paragraph styles.
|
|
16
|
+
// - `.text-small`: Sets the font size, margin, font weight, and line height properties to Graupl's small text styles.
|
|
17
|
+
// - `.text-h1`: Sets the font size, margin, font family, font weight, and line height properties to Graupl's h1 styles.
|
|
18
|
+
// - `.text-h2`: Sets the font size, margin, font family, font weight, and line height properties to Graupl's h2 styles.
|
|
19
|
+
// - `.text-h3`: Sets the font size, margin, font family, font weight, and line height properties to Graupl's h3 styles.
|
|
20
|
+
// - `.text-h4`: Sets the font size, margin, font family, font weight, and line height properties to Graupl's h4 styles.
|
|
21
|
+
// - `.text-h5`: Sets the font size, margin, font family, font weight, and line height properties to Graupl's h5 styles.
|
|
22
|
+
// - `.text-h6`: Sets the font size, margin, font family, font weight, and line height properties to Graupl's h6 styles.
|
|
23
|
+
// - `.font-weight-light`: Sets the font weight property to Graupl's light font weight.
|
|
24
|
+
// - `.font-weight-normal`: Sets the font weight property to Graupl's normal font weight.
|
|
25
|
+
// - `.font-weight-bold`: Sets the font weight property to Graupl's bold font weight.
|
|
26
|
+
// - `.font-normal`: Sets the font style property to `normal`.
|
|
27
|
+
// - `.font-italic`: Sets the font style property to `italic`.
|
|
28
|
+
// - `.text-uppercase`: Sets the text transform property to `uppercase`.
|
|
29
|
+
// - `.text-lowercase`: Sets the text transform property to `lowercase`.
|
|
30
|
+
// - `.text-capitalize`: Sets the text transform property to `capitalize`.
|
|
31
|
+
// - `.text-none`: Sets the text transform property to `none`.
|
|
32
|
+
//
|
|
33
|
+
// The following custom properties control the generated classes:
|
|
34
|
+
// - N/A.
|
|
35
|
+
//
|
|
36
|
+
// The following variables control the generated classes:
|
|
37
|
+
// - `$selector-base`: The base selector for the utility classes.
|
|
38
|
+
// - `$use-important`: A flag to determine if the `!important` flag should be added to the utility classes.
|
|
39
|
+
// - `$screen-aware`: A flag to generate screen-aware utility classes.
|
|
40
|
+
// - `$theme-aware`: A flag to generate theme-aware utility classes.
|
|
41
|
+
// - `$state-aware`: A flag to generate state-aware utility classes.
|
|
42
|
+
// - `$container-aware`: A flag to generate container-aware utility classes.
|
|
43
|
+
// - `$screen-aware-separator`: The separator for screen-aware utility classes.
|
|
44
|
+
// - `$theme-aware-separator`: The separator for theme-aware utility classes.
|
|
45
|
+
// - `$state-aware-separator`: The separator for state-aware utility classes.
|
|
46
|
+
// - `$container-aware-separator`: The separator for container-aware utility classes.
|
|
47
|
+
// - `$screen-aware-selector-prefix`: The prefix for screen-aware utility classes.
|
|
48
|
+
// - `$theme-aware-selector-prefix`: The prefix for theme-aware utility classes.
|
|
49
|
+
// - `$state-aware-selector-prefix`: The prefix for state-aware utility classes.
|
|
50
|
+
// - `$container-aware-selector-prefix`: The prefix for container-aware utility classes.
|
|
51
|
+
// - `$text-selector-prefix`: The prefix for the text utility classes.
|
|
52
|
+
// - `$font-weight-selector-prefix`: The prefix for the font weight utility classes.
|
|
53
|
+
// - `$font-style-selector-prefix`: The prefix for the font style utility classes.
|
|
54
|
+
// - `$base-font-style-properties`: The base properties and values for the font style utility classes.
|
|
55
|
+
// - `$custom-font-style-properties`: The custom properties and values for the font style utility classes.
|
|
56
|
+
// - `$font-style-properties`: The combined properties and values for the font style utility classes.
|
|
57
|
+
// - `$text-transform-selector-prefix`: The prefix for the text transform utility classes.
|
|
58
|
+
// - `$base-text-transform-properties`: The base properties and values for the text transform utility classes.
|
|
59
|
+
// - `$custom-text-transform-properties`: The custom properties and values for the text transform utility classes.
|
|
60
|
+
// - `$text-transform-properties`: The combined properties and values for the text transform utility classes.
|
|
61
|
+
//
|
|
62
|
+
// Generating responsive utility classes can be done by setting `$screen-aware`, `$theme-aware`, or `$state-aware` to `true`.
|
|
63
|
+
// By default, no responsive utility classes are generated.
|
|
64
|
+
//
|
|
65
|
+
// When set to true, screen-aware utility classes will be generated for each screen size in the following pattern:
|
|
66
|
+
// - `.{screen-prefix}{screen-name}:{prefix}{value}`
|
|
67
|
+
//
|
|
68
|
+
// e.g. `.md:text-2xl` will set the `font-size` property to Graupl's 2 extra large font size on screens equal to or larger than the `md` breakpoint.
|
|
69
|
+
//
|
|
70
|
+
// When set to true, theme-aware utility classes will be generated for each theme in the following pattern:
|
|
71
|
+
// - `.{theme-prefix}{theme-name}:{prefix}{value}`
|
|
72
|
+
//
|
|
73
|
+
// e.g. `.dark:text-paragraph` will set the `font-size`, `margin`, `font-weight`, and `line-height` properties to Graupl's paragraph styles when the `dark` theme is active.
|
|
74
|
+
//
|
|
75
|
+
// When set to true, state-aware utility classes will be generated for each state in the following pattern:
|
|
76
|
+
// - `.{state-prefix}{state-name}:{prefix}{value}`
|
|
77
|
+
//
|
|
78
|
+
// e.g. `.hover:text-paragraph` will set the `font-size`, `margin`, `font-weight`, and `line-height` properties to Graupl's paragraph styles when the element is hovered.
|
|
79
|
+
//
|
|
80
|
+
// When set to true, container-aware utility classes will be generated for each container in the following pattern:
|
|
81
|
+
// - `.{container-prefix}{container-name}:{prefix}{value}`
|
|
82
|
+
//
|
|
83
|
+
// e.g. `.cq:md:text-paragraph` will set the `font-size`, `margin`, `font-weight`, and `line-height` properties to Graupl's paragraph styles when the parent container is larger than the `md` breakpoint.
|
|
84
|
+
//
|
|
85
|
+
// @example
|
|
86
|
+
// <span class="text-h3">This is an h3-styled element.</span>
|
|
87
|
+
|
|
88
|
+
@use "../../defaults" as root-defaults;
|
|
89
|
+
@use "../../functions/important";
|
|
90
|
+
@use "../../mixins/layer" as *;
|
|
91
|
+
@use "../../mixins/screen";
|
|
92
|
+
@use "../../mixins/utility";
|
|
93
|
+
@use "../../theme/color/variables" as color;
|
|
94
|
+
@use "../../theme/typography/variables" as typography;
|
|
95
|
+
@use "defaults";
|
|
96
|
+
@use "sass:map";
|
|
97
|
+
@use "variables" as *;
|
|
98
|
+
|
|
99
|
+
@include layer(utilities) {
|
|
100
|
+
// `.`
|
|
101
|
+
$selector-prefix: defaults.$selector-base;
|
|
102
|
+
|
|
103
|
+
// For each font size property, create a utility class.
|
|
104
|
+
@each $size, $value in typography.$font-sizes {
|
|
105
|
+
// e.g. `.text-2xl` or `.text-3xl`
|
|
106
|
+
$selector: #{$selector-prefix}#{defaults.$text-selector-prefix}#{$size};
|
|
107
|
+
|
|
108
|
+
@include utility.create($selector, font-size, $value);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Create utility classes for each type of text style in Graupl.
|
|
112
|
+
// These will apply not only the font size, but also the margin, font weight, and line height.
|
|
113
|
+
// This will allow for a more consistent and maintainable typography system.
|
|
114
|
+
//
|
|
115
|
+
// `.text-paragraph`
|
|
116
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}paragraph";
|
|
117
|
+
|
|
118
|
+
@include utility.create-mapped(
|
|
119
|
+
$selector,
|
|
120
|
+
(
|
|
121
|
+
margin: typography.$paragraph-margin,
|
|
122
|
+
font-size: typography.$paragraph-font-size,
|
|
123
|
+
font-weight: typography.$paragraph-font-weight,
|
|
124
|
+
line-height: typography.$paragraph-line-height,
|
|
125
|
+
color: typography.$paragraph-color,
|
|
126
|
+
),
|
|
127
|
+
$important: defaults.$use-important
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
// `.text-small`
|
|
131
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}small";
|
|
132
|
+
|
|
133
|
+
@include utility.create-mapped(
|
|
134
|
+
$selector,
|
|
135
|
+
(
|
|
136
|
+
margin: typography.$small-margin,
|
|
137
|
+
font-size: typography.$small-font-size,
|
|
138
|
+
font-weight: typography.$small-font-weight,
|
|
139
|
+
line-height: typography.$small-line-height,
|
|
140
|
+
color: typography.$small-color,
|
|
141
|
+
),
|
|
142
|
+
$important: defaults.$use-important
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
// `.text-h1`
|
|
146
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h1";
|
|
147
|
+
|
|
148
|
+
@include utility.create-mapped(
|
|
149
|
+
$selector,
|
|
150
|
+
(
|
|
151
|
+
margin: typography.$h1-margin,
|
|
152
|
+
font-family: typography.$h1-font-family,
|
|
153
|
+
font-size: typography.$h1-font-size,
|
|
154
|
+
font-weight: typography.$h1-font-weight,
|
|
155
|
+
line-height: typography.$h1-line-height,
|
|
156
|
+
color: typography.$h1-color,
|
|
157
|
+
),
|
|
158
|
+
$important: defaults.$use-important
|
|
159
|
+
);
|
|
160
|
+
|
|
161
|
+
// `.text-h2`
|
|
162
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h2";
|
|
163
|
+
|
|
164
|
+
@include utility.create-mapped(
|
|
165
|
+
$selector,
|
|
166
|
+
(
|
|
167
|
+
margin: typography.$h2-margin,
|
|
168
|
+
font-family: typography.$h2-font-family,
|
|
169
|
+
font-size: typography.$h2-font-size,
|
|
170
|
+
font-weight: typography.$h2-font-weight,
|
|
171
|
+
line-height: typography.$h2-line-height,
|
|
172
|
+
color: typography.$h2-color,
|
|
173
|
+
),
|
|
174
|
+
$important: defaults.$use-important
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
// `.text-h3`
|
|
178
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h3";
|
|
179
|
+
|
|
180
|
+
@include utility.create-mapped(
|
|
181
|
+
$selector,
|
|
182
|
+
(
|
|
183
|
+
margin: typography.$h3-margin,
|
|
184
|
+
font-family: typography.$h3-font-family,
|
|
185
|
+
font-size: typography.$h3-font-size,
|
|
186
|
+
font-weight: typography.$h3-font-weight,
|
|
187
|
+
line-height: typography.$h3-line-height,
|
|
188
|
+
color: typography.$h3-color,
|
|
189
|
+
),
|
|
190
|
+
$important: defaults.$use-important
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
// `.text-h4`
|
|
194
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h4";
|
|
195
|
+
|
|
196
|
+
@include utility.create-mapped(
|
|
197
|
+
$selector,
|
|
198
|
+
(
|
|
199
|
+
margin: typography.$h4-margin,
|
|
200
|
+
font-family: typography.$h4-font-family,
|
|
201
|
+
font-size: typography.$h4-font-size,
|
|
202
|
+
font-weight: typography.$h4-font-weight,
|
|
203
|
+
line-height: typography.$h4-line-height,
|
|
204
|
+
color: typography.$h4-color,
|
|
205
|
+
),
|
|
206
|
+
$important: defaults.$use-important
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
// `.text-h5`
|
|
210
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h5";
|
|
211
|
+
|
|
212
|
+
@include utility.create-mapped(
|
|
213
|
+
$selector,
|
|
214
|
+
(
|
|
215
|
+
margin: typography.$h5-margin,
|
|
216
|
+
font-family: typography.$h5-font-family,
|
|
217
|
+
font-size: typography.$h5-font-size,
|
|
218
|
+
font-weight: typography.$h5-font-weight,
|
|
219
|
+
line-height: typography.$h5-line-height,
|
|
220
|
+
color: typography.$h5-color,
|
|
221
|
+
),
|
|
222
|
+
$important: defaults.$use-important
|
|
223
|
+
);
|
|
224
|
+
|
|
225
|
+
// `.text-h6`
|
|
226
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h6";
|
|
227
|
+
|
|
228
|
+
@include utility.create-mapped(
|
|
229
|
+
$selector,
|
|
230
|
+
(
|
|
231
|
+
margin: typography.$h6-margin,
|
|
232
|
+
font-family: typography.$h6-font-family,
|
|
233
|
+
font-size: typography.$h6-font-size,
|
|
234
|
+
font-weight: typography.$h6-font-weight,
|
|
235
|
+
line-height: typography.$h6-line-height,
|
|
236
|
+
color: typography.$h6-color,
|
|
237
|
+
),
|
|
238
|
+
$important: defaults.$use-important
|
|
239
|
+
);
|
|
240
|
+
|
|
241
|
+
// For each font weight property, create a utility class.
|
|
242
|
+
@each $weight, $value in typography.$font-weights {
|
|
243
|
+
// e.g. `.font-bold` or `.font-normal`
|
|
244
|
+
$selector: #{$selector-prefix}#{defaults.$font-weight-selector-prefix}#{$weight};
|
|
245
|
+
|
|
246
|
+
@include utility.create(
|
|
247
|
+
$selector,
|
|
248
|
+
font-weight,
|
|
249
|
+
$value,
|
|
250
|
+
$important: defaults.$use-important
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// For each font style property, create a utility class.
|
|
255
|
+
@each $style, $value in defaults.$font-style-properties {
|
|
256
|
+
// e.g. `.font-normal` or `.font-italic`
|
|
257
|
+
$selector: #{$selector-prefix}#{defaults.$font-style-selector-prefix}#{$style};
|
|
258
|
+
|
|
259
|
+
@include utility.create(
|
|
260
|
+
$selector,
|
|
261
|
+
font-style,
|
|
262
|
+
$value,
|
|
263
|
+
$important: defaults.$use-important
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// For each text transform property, create a utility class.
|
|
268
|
+
@each $transform, $value in defaults.$text-transform-properties {
|
|
269
|
+
// e.g. `.text-uppercase` or `.text-lowercase`
|
|
270
|
+
$selector: #{$selector-prefix}#{defaults.$text-transform-selector-prefix}#{$transform};
|
|
271
|
+
|
|
272
|
+
@include utility.create(
|
|
273
|
+
$selector,
|
|
274
|
+
text-transform,
|
|
275
|
+
$value,
|
|
276
|
+
$important: defaults.$use-important
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// Generate screen-aware utilities.
|
|
281
|
+
@if defaults.$screen-aware and root-defaults.$screen-aware-utilities {
|
|
282
|
+
@each $screen-name in map.keys(root-defaults.$screen-sizes) {
|
|
283
|
+
// e.g. `.md:` or `.lg:`
|
|
284
|
+
$selector-prefix: #{defaults.$selector-base}#{defaults.$screen-aware-selector-prefix}#{$screen-name}#{defaults.$screen-aware-separator};
|
|
285
|
+
|
|
286
|
+
// For each font size property, create a utility class.
|
|
287
|
+
@each $size, $value in typography.$font-sizes {
|
|
288
|
+
// e.g. `.md:text-2xl` or `.lg:text-3xl`
|
|
289
|
+
$selector: #{$selector-prefix}#{defaults.$text-selector-prefix}#{$size};
|
|
290
|
+
|
|
291
|
+
@include utility.create(
|
|
292
|
+
$selector,
|
|
293
|
+
font-size,
|
|
294
|
+
$value,
|
|
295
|
+
$important: defaults.$use-important,
|
|
296
|
+
$screen: $screen-name
|
|
297
|
+
);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Create utility classes for each type of text style in Graupl.
|
|
301
|
+
// These will apply not only the font size, but also the margin, font weight, and line height.
|
|
302
|
+
// This will allow for a more consistent and maintainable typography system.
|
|
303
|
+
//
|
|
304
|
+
// e.g. `.md:text-paragraph` or `.lg:text-paragraph`
|
|
305
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}paragraph";
|
|
306
|
+
|
|
307
|
+
@include utility.create-mapped(
|
|
308
|
+
$selector,
|
|
309
|
+
(
|
|
310
|
+
margin: typography.$paragraph-margin,
|
|
311
|
+
font-size: typography.$paragraph-font-size,
|
|
312
|
+
font-weight: typography.$paragraph-font-weight,
|
|
313
|
+
line-height: typography.$paragraph-line-height,
|
|
314
|
+
color: typography.$paragraph-color,
|
|
315
|
+
),
|
|
316
|
+
$important: defaults.$use-important,
|
|
317
|
+
$screen: $screen-name
|
|
318
|
+
);
|
|
319
|
+
|
|
320
|
+
// e.g. `.md:text-small` or `.lg:text-small`
|
|
321
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}small";
|
|
322
|
+
|
|
323
|
+
@include utility.create-mapped(
|
|
324
|
+
$selector,
|
|
325
|
+
(
|
|
326
|
+
margin: typography.$small-margin,
|
|
327
|
+
font-size: typography.$small-font-size,
|
|
328
|
+
font-weight: typography.$small-font-weight,
|
|
329
|
+
line-height: typography.$small-line-height,
|
|
330
|
+
color: typography.$small-color,
|
|
331
|
+
),
|
|
332
|
+
$important: defaults.$use-important,
|
|
333
|
+
$screen: $screen-name
|
|
334
|
+
);
|
|
335
|
+
|
|
336
|
+
// e.g. `.md:text-h1` or `.lg:text-h1`
|
|
337
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h1";
|
|
338
|
+
|
|
339
|
+
@include utility.create-mapped(
|
|
340
|
+
$selector,
|
|
341
|
+
(
|
|
342
|
+
margin: typography.$h1-margin,
|
|
343
|
+
font-family: typography.$h1-font-family,
|
|
344
|
+
font-size: typography.$h1-font-size,
|
|
345
|
+
font-weight: typography.$h1-font-weight,
|
|
346
|
+
line-height: typography.$h1-line-height,
|
|
347
|
+
color: typography.$h1-color,
|
|
348
|
+
),
|
|
349
|
+
$important: defaults.$use-important,
|
|
350
|
+
$screen: $screen-name
|
|
351
|
+
);
|
|
352
|
+
|
|
353
|
+
// e.g. `.md:text-h2` or `.lg:text-h2`
|
|
354
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h2";
|
|
355
|
+
|
|
356
|
+
@include utility.create-mapped(
|
|
357
|
+
$selector,
|
|
358
|
+
(
|
|
359
|
+
margin: typography.$h2-margin,
|
|
360
|
+
font-family: typography.$h2-font-family,
|
|
361
|
+
font-size: typography.$h2-font-size,
|
|
362
|
+
font-weight: typography.$h2-font-weight,
|
|
363
|
+
line-height: typography.$h2-line-height,
|
|
364
|
+
color: typography.$h2-color,
|
|
365
|
+
),
|
|
366
|
+
$important: defaults.$use-important,
|
|
367
|
+
$screen: $screen-name
|
|
368
|
+
);
|
|
369
|
+
|
|
370
|
+
// e.g. `.md:text-h3` or `.lg:text-h3`
|
|
371
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h3";
|
|
372
|
+
|
|
373
|
+
@include utility.create-mapped(
|
|
374
|
+
$selector,
|
|
375
|
+
(
|
|
376
|
+
margin: typography.$h3-margin,
|
|
377
|
+
font-family: typography.$h3-font-family,
|
|
378
|
+
font-size: typography.$h3-font-size,
|
|
379
|
+
font-weight: typography.$h3-font-weight,
|
|
380
|
+
line-height: typography.$h3-line-height,
|
|
381
|
+
color: typography.$h3-color,
|
|
382
|
+
),
|
|
383
|
+
$important: defaults.$use-important,
|
|
384
|
+
$screen: $screen-name
|
|
385
|
+
);
|
|
386
|
+
|
|
387
|
+
// e.g. `.md:text-h4` or `.lg:text-h4`
|
|
388
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h4";
|
|
389
|
+
|
|
390
|
+
@include utility.create-mapped(
|
|
391
|
+
$selector,
|
|
392
|
+
(
|
|
393
|
+
margin: typography.$h4-margin,
|
|
394
|
+
font-family: typography.$h4-font-family,
|
|
395
|
+
font-size: typography.$h4-font-size,
|
|
396
|
+
font-weight: typography.$h4-font-weight,
|
|
397
|
+
line-height: typography.$h4-line-height,
|
|
398
|
+
color: typography.$h4-color,
|
|
399
|
+
),
|
|
400
|
+
$important: defaults.$use-important,
|
|
401
|
+
$screen: $screen-name
|
|
402
|
+
);
|
|
403
|
+
|
|
404
|
+
// e.g. `.md:text-h5` or `.lg:text-h5`
|
|
405
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h5";
|
|
406
|
+
|
|
407
|
+
@include utility.create-mapped(
|
|
408
|
+
$selector,
|
|
409
|
+
(
|
|
410
|
+
margin: typography.$h5-margin,
|
|
411
|
+
font-family: typography.$h5-font-family,
|
|
412
|
+
font-size: typography.$h5-font-size,
|
|
413
|
+
font-weight: typography.$h5-font-weight,
|
|
414
|
+
line-height: typography.$h5-line-height,
|
|
415
|
+
color: typography.$h5-color,
|
|
416
|
+
),
|
|
417
|
+
$important: defaults.$use-important,
|
|
418
|
+
$screen: $screen-name
|
|
419
|
+
);
|
|
420
|
+
|
|
421
|
+
// e.g. `.md:text-h6` or `.lg:text-h6`
|
|
422
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h6";
|
|
423
|
+
|
|
424
|
+
@include utility.create-mapped(
|
|
425
|
+
$selector,
|
|
426
|
+
(
|
|
427
|
+
margin: typography.$h6-margin,
|
|
428
|
+
font-family: typography.$h6-font-family,
|
|
429
|
+
font-size: typography.$h6-font-size,
|
|
430
|
+
font-weight: typography.$h6-font-weight,
|
|
431
|
+
line-height: typography.$h6-line-height,
|
|
432
|
+
color: typography.$h6-color,
|
|
433
|
+
),
|
|
434
|
+
$important: defaults.$use-important,
|
|
435
|
+
$screen: $screen-name
|
|
436
|
+
);
|
|
437
|
+
|
|
438
|
+
// For each font weight property, create a utility class.
|
|
439
|
+
@each $weight, $value in typography.$font-weights {
|
|
440
|
+
// e.g. `.md:font-bold` or `.lg:font-normal`
|
|
441
|
+
$selector: #{$selector-prefix}#{defaults.$font-weight-selector-prefix}#{$weight};
|
|
442
|
+
|
|
443
|
+
@include utility.create(
|
|
444
|
+
$selector,
|
|
445
|
+
font-weight,
|
|
446
|
+
$value,
|
|
447
|
+
$important: defaults.$use-important,
|
|
448
|
+
$screen: $screen-name
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// For each font style property, create a utility class.
|
|
453
|
+
@each $style, $value in defaults.$font-style-properties {
|
|
454
|
+
// e.g. `.md:font-normal` or `.lg:font-italic`
|
|
455
|
+
$selector: #{$selector-prefix}#{defaults.$font-style-selector-prefix}#{$style};
|
|
456
|
+
|
|
457
|
+
@include utility.create(
|
|
458
|
+
$selector,
|
|
459
|
+
font-style,
|
|
460
|
+
$value,
|
|
461
|
+
$important: defaults.$use-important,
|
|
462
|
+
$screen: $screen-name
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
// For each text transform property, create a utility class.
|
|
467
|
+
@each $transform, $value in defaults.$text-transform-properties {
|
|
468
|
+
// e.g. `.md:text-uppercase` or `.lg:text-lowercase`
|
|
469
|
+
$selector: #{$selector-prefix}#{defaults.$text-transform-selector-prefix}#{$transform};
|
|
470
|
+
|
|
471
|
+
@include utility.create(
|
|
472
|
+
$selector,
|
|
473
|
+
text-transform,
|
|
474
|
+
$value,
|
|
475
|
+
$important: defaults.$use-important,
|
|
476
|
+
$screen: $screen-name
|
|
477
|
+
);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// Generate theme-aware utilities.
|
|
483
|
+
@if defaults.$theme-aware and root-defaults.$theme-aware-utilities {
|
|
484
|
+
@each $theme-name, $colors in color.$themes {
|
|
485
|
+
@if $theme-name != active {
|
|
486
|
+
// e.g. `.dark:` or `.light:`
|
|
487
|
+
$selector-prefix: #{defaults.$selector-base}#{defaults.$theme-aware-selector-prefix}#{$theme-name}#{defaults.$theme-aware-separator};
|
|
488
|
+
|
|
489
|
+
// For each font size property, create a utility class.
|
|
490
|
+
@each $size, $value in typography.$font-sizes {
|
|
491
|
+
// e.g. `.dark:text-2xl` or `.light:text-3xl`
|
|
492
|
+
$selector: #{$selector-prefix}#{defaults.$text-selector-prefix}#{$size};
|
|
493
|
+
|
|
494
|
+
@include utility.create(
|
|
495
|
+
$selector,
|
|
496
|
+
font-size,
|
|
497
|
+
$value,
|
|
498
|
+
$important: defaults.$use-important,
|
|
499
|
+
$theme: $theme-name
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
// Create utility classes for each type of text style in Graupl.
|
|
504
|
+
// These will apply not only the font size, but also the margin, font weight, and line height.
|
|
505
|
+
// This will allow for a more consistent and maintainable typography system.
|
|
506
|
+
//
|
|
507
|
+
// e.g. `.dark:text-paragraph` or `.light:text-paragraph`
|
|
508
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}paragraph";
|
|
509
|
+
|
|
510
|
+
@include utility.create-mapped(
|
|
511
|
+
$selector,
|
|
512
|
+
(
|
|
513
|
+
margin: typography.$paragraph-margin,
|
|
514
|
+
font-size: typography.$paragraph-font-size,
|
|
515
|
+
font-weight: typography.$paragraph-font-weight,
|
|
516
|
+
line-height: typography.$paragraph-line-height,
|
|
517
|
+
color: typography.$paragraph-color,
|
|
518
|
+
),
|
|
519
|
+
$important: defaults.$use-important,
|
|
520
|
+
$theme: $theme-name
|
|
521
|
+
);
|
|
522
|
+
|
|
523
|
+
// e.g. `.dark:text-small` or `.light:text-small`
|
|
524
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}small";
|
|
525
|
+
|
|
526
|
+
@include utility.create-mapped(
|
|
527
|
+
$selector,
|
|
528
|
+
(
|
|
529
|
+
margin: typography.$small-margin,
|
|
530
|
+
font-size: typography.$small-font-size,
|
|
531
|
+
font-weight: typography.$small-font-weight,
|
|
532
|
+
line-height: typography.$small-line-height,
|
|
533
|
+
color: typography.$small-color,
|
|
534
|
+
),
|
|
535
|
+
$important: defaults.$use-important,
|
|
536
|
+
$theme: $theme-name
|
|
537
|
+
);
|
|
538
|
+
|
|
539
|
+
// e.g. `.dark:text-h1` or `.light:text-h1`
|
|
540
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h1";
|
|
541
|
+
|
|
542
|
+
@include utility.create-mapped(
|
|
543
|
+
$selector,
|
|
544
|
+
(
|
|
545
|
+
margin: typography.$h1-margin,
|
|
546
|
+
font-family: typography.$h1-font-family,
|
|
547
|
+
font-size: typography.$h1-font-size,
|
|
548
|
+
font-weight: typography.$h1-font-weight,
|
|
549
|
+
line-height: typography.$h1-line-height,
|
|
550
|
+
color: typography.$h1-color,
|
|
551
|
+
),
|
|
552
|
+
$important: defaults.$use-important,
|
|
553
|
+
$theme: $theme-name
|
|
554
|
+
);
|
|
555
|
+
|
|
556
|
+
// e.g. `.dark:text-h2` or `.light:text-h2`
|
|
557
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h2";
|
|
558
|
+
|
|
559
|
+
@include utility.create-mapped(
|
|
560
|
+
$selector,
|
|
561
|
+
(
|
|
562
|
+
margin: typography.$h2-margin,
|
|
563
|
+
font-family: typography.$h2-font-family,
|
|
564
|
+
font-size: typography.$h2-font-size,
|
|
565
|
+
font-weight: typography.$h2-font-weight,
|
|
566
|
+
line-height: typography.$h2-line-height,
|
|
567
|
+
color: typography.$h2-color,
|
|
568
|
+
),
|
|
569
|
+
$important: defaults.$use-important,
|
|
570
|
+
$theme: $theme-name
|
|
571
|
+
);
|
|
572
|
+
|
|
573
|
+
// e.g. `.dark:text-h3` or `.light:text-h3`
|
|
574
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h3";
|
|
575
|
+
|
|
576
|
+
@include utility.create-mapped(
|
|
577
|
+
$selector,
|
|
578
|
+
(
|
|
579
|
+
margin: typography.$h3-margin,
|
|
580
|
+
font-family: typography.$h3-font-family,
|
|
581
|
+
font-size: typography.$h3-font-size,
|
|
582
|
+
font-weight: typography.$h3-font-weight,
|
|
583
|
+
line-height: typography.$h3-line-height,
|
|
584
|
+
color: typography.$h3-color,
|
|
585
|
+
),
|
|
586
|
+
$important: defaults.$use-important,
|
|
587
|
+
$theme: $theme-name
|
|
588
|
+
);
|
|
589
|
+
|
|
590
|
+
// e.g. `.dark:text-h4` or `.light:text-h4`
|
|
591
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h4";
|
|
592
|
+
|
|
593
|
+
@include utility.create-mapped(
|
|
594
|
+
$selector,
|
|
595
|
+
(
|
|
596
|
+
margin: typography.$h4-margin,
|
|
597
|
+
font-family: typography.$h4-font-family,
|
|
598
|
+
font-size: typography.$h4-font-size,
|
|
599
|
+
font-weight: typography.$h4-font-weight,
|
|
600
|
+
line-height: typography.$h4-line-height,
|
|
601
|
+
color: typography.$h4-color,
|
|
602
|
+
),
|
|
603
|
+
$important: defaults.$use-important,
|
|
604
|
+
$theme: $theme-name
|
|
605
|
+
);
|
|
606
|
+
|
|
607
|
+
// e.g. `.dark:text-h5` or `.light:text-h5`
|
|
608
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h5";
|
|
609
|
+
|
|
610
|
+
@include utility.create-mapped(
|
|
611
|
+
$selector,
|
|
612
|
+
(
|
|
613
|
+
margin: typography.$h5-margin,
|
|
614
|
+
font-family: typography.$h5-font-family,
|
|
615
|
+
font-size: typography.$h5-font-size,
|
|
616
|
+
font-weight: typography.$h5-font-weight,
|
|
617
|
+
line-height: typography.$h5-line-height,
|
|
618
|
+
color: typography.$h5-color,
|
|
619
|
+
),
|
|
620
|
+
$important: defaults.$use-important,
|
|
621
|
+
$theme: $theme-name
|
|
622
|
+
);
|
|
623
|
+
|
|
624
|
+
// e.g. `.dark:text-h6` or `.light:text-h6`
|
|
625
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h6";
|
|
626
|
+
|
|
627
|
+
@include utility.create-mapped(
|
|
628
|
+
$selector,
|
|
629
|
+
(
|
|
630
|
+
margin: typography.$h6-margin,
|
|
631
|
+
font-family: typography.$h6-font-family,
|
|
632
|
+
font-size: typography.$h6-font-size,
|
|
633
|
+
font-weight: typography.$h6-font-weight,
|
|
634
|
+
line-height: typography.$h6-line-height,
|
|
635
|
+
color: typography.$h6-color,
|
|
636
|
+
),
|
|
637
|
+
$important: defaults.$use-important,
|
|
638
|
+
$theme: $theme-name
|
|
639
|
+
);
|
|
640
|
+
|
|
641
|
+
// For each font weight property, create a utility class.
|
|
642
|
+
@each $weight, $value in typography.$font-weights {
|
|
643
|
+
// e.g. `.dark:font-bold` or `.light:font-normal`
|
|
644
|
+
$selector: #{$selector-prefix}#{defaults.$font-weight-selector-prefix}#{$weight};
|
|
645
|
+
|
|
646
|
+
@include utility.create(
|
|
647
|
+
$selector,
|
|
648
|
+
font-weight,
|
|
649
|
+
$value,
|
|
650
|
+
$important: defaults.$use-important,
|
|
651
|
+
$theme: $theme-name
|
|
652
|
+
);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
// For each font style property, create a utility class.
|
|
656
|
+
@each $style, $value in defaults.$font-style-properties {
|
|
657
|
+
// e.g. `.dark:font-normal` or `.light:font-italic`
|
|
658
|
+
$selector: #{$selector-prefix}#{defaults.$font-style-selector-prefix}#{$style};
|
|
659
|
+
|
|
660
|
+
@include utility.create(
|
|
661
|
+
$selector,
|
|
662
|
+
font-style,
|
|
663
|
+
$value,
|
|
664
|
+
$important: defaults.$use-important,
|
|
665
|
+
$theme: $theme-name
|
|
666
|
+
);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
// For each text transform property, create a utility class.
|
|
670
|
+
@each $transform, $value in defaults.$text-transform-properties {
|
|
671
|
+
// e.g. `.dark:text-uppercase` or `.light:text-lowercase`
|
|
672
|
+
$selector: #{$selector-prefix}#{defaults.$text-transform-selector-prefix}#{$transform};
|
|
673
|
+
|
|
674
|
+
@include utility.create(
|
|
675
|
+
$selector,
|
|
676
|
+
text-transform,
|
|
677
|
+
$value,
|
|
678
|
+
$important: defaults.$use-important,
|
|
679
|
+
$theme: $theme-name
|
|
680
|
+
);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
// Generate state-aware utilities.
|
|
687
|
+
@if defaults.$state-aware and root-defaults.$state-aware-utilities {
|
|
688
|
+
@each $state-name, $value in root-defaults.$state-selectors {
|
|
689
|
+
// e.g. `.hover:` or `.focus:`
|
|
690
|
+
$selector-prefix: #{defaults.$selector-base}#{defaults.$state-aware-selector-prefix}#{$state-name}#{defaults.$state-aware-separator};
|
|
691
|
+
|
|
692
|
+
// For each font size property, create a utility class.
|
|
693
|
+
@each $size, $value in typography.$font-sizes {
|
|
694
|
+
// e.g. `.hover:text-2xl` or `.focus:text-3xl`
|
|
695
|
+
$selector: #{$selector-prefix}#{defaults.$text-selector-prefix}#{$size};
|
|
696
|
+
|
|
697
|
+
@include utility.create(
|
|
698
|
+
$selector,
|
|
699
|
+
font-size,
|
|
700
|
+
$value,
|
|
701
|
+
$important: defaults.$use-important,
|
|
702
|
+
$state: $state-name
|
|
703
|
+
);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
// Create utility classes for each type of text style in Graupl.
|
|
707
|
+
// These will apply not only the font size, but also the margin, font weight, and line height.
|
|
708
|
+
// This will allow for a more consistent and maintainable typography system.
|
|
709
|
+
//
|
|
710
|
+
// e.g. `.hover:text-paragraph` or `.focus:text-paragraph`
|
|
711
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}paragraph";
|
|
712
|
+
|
|
713
|
+
@include utility.create-mapped(
|
|
714
|
+
$selector,
|
|
715
|
+
(
|
|
716
|
+
margin: typography.$paragraph-margin,
|
|
717
|
+
font-size: typography.$paragraph-font-size,
|
|
718
|
+
font-weight: typography.$paragraph-font-weight,
|
|
719
|
+
line-height: typography.$paragraph-line-height,
|
|
720
|
+
color: typography.$paragraph-color,
|
|
721
|
+
),
|
|
722
|
+
$important: defaults.$use-important,
|
|
723
|
+
$state: $state-name
|
|
724
|
+
);
|
|
725
|
+
|
|
726
|
+
// e.g. `.hover:text-small` or `.focus:text-small`
|
|
727
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}small";
|
|
728
|
+
|
|
729
|
+
@include utility.create-mapped(
|
|
730
|
+
$selector,
|
|
731
|
+
(
|
|
732
|
+
margin: typography.$small-margin,
|
|
733
|
+
font-size: typography.$small-font-size,
|
|
734
|
+
font-weight: typography.$small-font-weight,
|
|
735
|
+
line-height: typography.$small-line-height,
|
|
736
|
+
color: typography.$small-color,
|
|
737
|
+
),
|
|
738
|
+
$important: defaults.$use-important,
|
|
739
|
+
$state: $state-name
|
|
740
|
+
);
|
|
741
|
+
|
|
742
|
+
// e.g. `.hover:text-h1` or `.focus:text-h1`
|
|
743
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h1";
|
|
744
|
+
|
|
745
|
+
@include utility.create-mapped(
|
|
746
|
+
$selector,
|
|
747
|
+
(
|
|
748
|
+
margin: typography.$h1-margin,
|
|
749
|
+
font-family: typography.$h1-font-family,
|
|
750
|
+
font-size: typography.$h1-font-size,
|
|
751
|
+
font-weight: typography.$h1-font-weight,
|
|
752
|
+
line-height: typography.$h1-line-height,
|
|
753
|
+
color: typography.$h1-color,
|
|
754
|
+
),
|
|
755
|
+
$important: defaults.$use-important,
|
|
756
|
+
$state: $state-name
|
|
757
|
+
);
|
|
758
|
+
|
|
759
|
+
// e.g. `.hover:text-h2` or `.focus:text-h2`
|
|
760
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h2";
|
|
761
|
+
|
|
762
|
+
@include utility.create-mapped(
|
|
763
|
+
$selector,
|
|
764
|
+
(
|
|
765
|
+
margin: typography.$h2-margin,
|
|
766
|
+
font-family: typography.$h2-font-family,
|
|
767
|
+
font-size: typography.$h2-font-size,
|
|
768
|
+
font-weight: typography.$h2-font-weight,
|
|
769
|
+
line-height: typography.$h2-line-height,
|
|
770
|
+
color: typography.$h2-color,
|
|
771
|
+
),
|
|
772
|
+
$important: defaults.$use-important,
|
|
773
|
+
$state: $state-name
|
|
774
|
+
);
|
|
775
|
+
|
|
776
|
+
// e.g. `.hover:text-h3` or `.focus:text-h3`
|
|
777
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h3";
|
|
778
|
+
|
|
779
|
+
@include utility.create-mapped(
|
|
780
|
+
$selector,
|
|
781
|
+
(
|
|
782
|
+
margin: typography.$h3-margin,
|
|
783
|
+
font-family: typography.$h3-font-family,
|
|
784
|
+
font-size: typography.$h3-font-size,
|
|
785
|
+
font-weight: typography.$h3-font-weight,
|
|
786
|
+
line-height: typography.$h3-line-height,
|
|
787
|
+
color: typography.$h3-color,
|
|
788
|
+
),
|
|
789
|
+
$important: defaults.$use-important,
|
|
790
|
+
$state: $state-name
|
|
791
|
+
);
|
|
792
|
+
|
|
793
|
+
// e.g. `.hover:text-h4` or `.focus:text-h4`
|
|
794
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h4";
|
|
795
|
+
|
|
796
|
+
@include utility.create-mapped(
|
|
797
|
+
$selector,
|
|
798
|
+
(
|
|
799
|
+
margin: typography.$h4-margin,
|
|
800
|
+
font-family: typography.$h4-font-family,
|
|
801
|
+
font-size: typography.$h4-font-size,
|
|
802
|
+
font-weight: typography.$h4-font-weight,
|
|
803
|
+
line-height: typography.$h4-line-height,
|
|
804
|
+
color: typography.$h4-color,
|
|
805
|
+
),
|
|
806
|
+
$important: defaults.$use-important,
|
|
807
|
+
$state: $state-name
|
|
808
|
+
);
|
|
809
|
+
|
|
810
|
+
// e.g. `.hover:text-h5` or `.focus:text-h5`
|
|
811
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h5";
|
|
812
|
+
|
|
813
|
+
@include utility.create-mapped(
|
|
814
|
+
$selector,
|
|
815
|
+
(
|
|
816
|
+
margin: typography.$h5-margin,
|
|
817
|
+
font-family: typography.$h5-font-family,
|
|
818
|
+
font-size: typography.$h5-font-size,
|
|
819
|
+
font-weight: typography.$h5-font-weight,
|
|
820
|
+
line-height: typography.$h5-line-height,
|
|
821
|
+
color: typography.$h5-color,
|
|
822
|
+
),
|
|
823
|
+
$important: defaults.$use-important,
|
|
824
|
+
$state: $state-name
|
|
825
|
+
);
|
|
826
|
+
|
|
827
|
+
// e.g. `.hover:text-h6` or `.focus:text-h6`
|
|
828
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h6";
|
|
829
|
+
|
|
830
|
+
@include utility.create-mapped(
|
|
831
|
+
$selector,
|
|
832
|
+
(
|
|
833
|
+
margin: typography.$h6-margin,
|
|
834
|
+
font-family: typography.$h6-font-family,
|
|
835
|
+
font-size: typography.$h6-font-size,
|
|
836
|
+
font-weight: typography.$h6-font-weight,
|
|
837
|
+
line-height: typography.$h6-line-height,
|
|
838
|
+
color: typography.$h6-color,
|
|
839
|
+
),
|
|
840
|
+
$important: defaults.$use-important,
|
|
841
|
+
$state: $state-name
|
|
842
|
+
);
|
|
843
|
+
|
|
844
|
+
// For each font weight property, create a utility class.
|
|
845
|
+
@each $weight, $value in typography.$font-weights {
|
|
846
|
+
// e.g. `.hover:font-bold` or `.focus:font-normal`
|
|
847
|
+
$selector: #{$selector-prefix}#{defaults.$font-weight-selector-prefix}#{$weight};
|
|
848
|
+
|
|
849
|
+
@include utility.create(
|
|
850
|
+
$selector,
|
|
851
|
+
font-weight,
|
|
852
|
+
$value,
|
|
853
|
+
$important: defaults.$use-important,
|
|
854
|
+
$state: $state-name
|
|
855
|
+
);
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
// For each font style property, create a utility class.
|
|
859
|
+
@each $style, $value in defaults.$font-style-properties {
|
|
860
|
+
// e.g. `.hover:font-normal` or `.focus:font-italic`
|
|
861
|
+
$selector: #{$selector-prefix}#{defaults.$font-style-selector-prefix}#{$style};
|
|
862
|
+
|
|
863
|
+
@include utility.create(
|
|
864
|
+
$selector,
|
|
865
|
+
font-style,
|
|
866
|
+
$value,
|
|
867
|
+
$important: defaults.$use-important,
|
|
868
|
+
$state: $state-name
|
|
869
|
+
);
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
// For each text transform property, create a utility class.
|
|
873
|
+
@each $transform, $value in defaults.$text-transform-properties {
|
|
874
|
+
// e.g. `.hover:text-uppercase` or `.focus:text-lowercase`
|
|
875
|
+
$selector: #{$selector-prefix}#{defaults.$text-transform-selector-prefix}#{$transform};
|
|
876
|
+
|
|
877
|
+
@include utility.create(
|
|
878
|
+
$selector,
|
|
879
|
+
text-transform,
|
|
880
|
+
$value,
|
|
881
|
+
$important: defaults.$use-important,
|
|
882
|
+
$state: $state-name
|
|
883
|
+
);
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
// Generate container-aware utilities.
|
|
889
|
+
@if defaults.$container-aware and root-defaults.$container-aware-utilities {
|
|
890
|
+
@each $container-name in map.keys(root-defaults.$container-sizes) {
|
|
891
|
+
// e.g. `.md:` or `.lg:`
|
|
892
|
+
$selector-prefix: #{defaults.$selector-base}#{defaults.$container-aware-selector-prefix}#{$container-name}#{defaults.$container-aware-separator};
|
|
893
|
+
|
|
894
|
+
// For each font size property, create a utility class.
|
|
895
|
+
@each $size, $value in typography.$font-sizes {
|
|
896
|
+
// e.g. `.md:text-2xl` or `.lg:text-3xl`
|
|
897
|
+
$selector: #{$selector-prefix}#{defaults.$text-selector-prefix}#{$size};
|
|
898
|
+
|
|
899
|
+
@include utility.create(
|
|
900
|
+
$selector,
|
|
901
|
+
font-size,
|
|
902
|
+
$value,
|
|
903
|
+
$important: defaults.$use-important,
|
|
904
|
+
$container: $container-name
|
|
905
|
+
);
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
// Create utility classes for each type of text style in Graupl.
|
|
909
|
+
// These will apply not only the font size, but also the margin, font weight, and line height.
|
|
910
|
+
// This will allow for a more consistent and maintainable typography system.
|
|
911
|
+
//
|
|
912
|
+
// e.g. `.md:text-paragraph` or `.lg:text-paragraph`
|
|
913
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}paragraph";
|
|
914
|
+
|
|
915
|
+
@include utility.create-mapped(
|
|
916
|
+
$selector,
|
|
917
|
+
(
|
|
918
|
+
margin: typography.$paragraph-margin,
|
|
919
|
+
font-size: typography.$paragraph-font-size,
|
|
920
|
+
font-weight: typography.$paragraph-font-weight,
|
|
921
|
+
line-height: typography.$paragraph-line-height,
|
|
922
|
+
color: typography.$paragraph-color,
|
|
923
|
+
),
|
|
924
|
+
$important: defaults.$use-important,
|
|
925
|
+
$container: $container-name
|
|
926
|
+
);
|
|
927
|
+
|
|
928
|
+
// e.g. `.md:text-small` or `.lg:text-small`
|
|
929
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}small";
|
|
930
|
+
|
|
931
|
+
@include utility.create-mapped(
|
|
932
|
+
$selector,
|
|
933
|
+
(
|
|
934
|
+
margin: typography.$small-margin,
|
|
935
|
+
font-size: typography.$small-font-size,
|
|
936
|
+
font-weight: typography.$small-font-weight,
|
|
937
|
+
line-height: typography.$small-line-height,
|
|
938
|
+
color: typography.$small-color,
|
|
939
|
+
),
|
|
940
|
+
$important: defaults.$use-important,
|
|
941
|
+
$container: $container-name
|
|
942
|
+
);
|
|
943
|
+
|
|
944
|
+
// e.g. `.md:text-h1` or `.lg:text-h1`
|
|
945
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h1";
|
|
946
|
+
|
|
947
|
+
@include utility.create-mapped(
|
|
948
|
+
$selector,
|
|
949
|
+
(
|
|
950
|
+
margin: typography.$h1-margin,
|
|
951
|
+
font-family: typography.$h1-font-family,
|
|
952
|
+
font-size: typography.$h1-font-size,
|
|
953
|
+
font-weight: typography.$h1-font-weight,
|
|
954
|
+
line-height: typography.$h1-line-height,
|
|
955
|
+
color: typography.$h1-color,
|
|
956
|
+
),
|
|
957
|
+
$important: defaults.$use-important,
|
|
958
|
+
$container: $container-name
|
|
959
|
+
);
|
|
960
|
+
|
|
961
|
+
// e.g. `.md:text-h2` or `.lg:text-h2`
|
|
962
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h2";
|
|
963
|
+
|
|
964
|
+
@include utility.create-mapped(
|
|
965
|
+
$selector,
|
|
966
|
+
(
|
|
967
|
+
margin: typography.$h2-margin,
|
|
968
|
+
font-family: typography.$h2-font-family,
|
|
969
|
+
font-size: typography.$h2-font-size,
|
|
970
|
+
font-weight: typography.$h2-font-weight,
|
|
971
|
+
line-height: typography.$h2-line-height,
|
|
972
|
+
color: typography.$h2-color,
|
|
973
|
+
),
|
|
974
|
+
$important: defaults.$use-important,
|
|
975
|
+
$container: $container-name
|
|
976
|
+
);
|
|
977
|
+
|
|
978
|
+
// e.g. `.md:text-h3` or `.lg:text-h3`
|
|
979
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h3";
|
|
980
|
+
|
|
981
|
+
@include utility.create-mapped(
|
|
982
|
+
$selector,
|
|
983
|
+
(
|
|
984
|
+
margin: typography.$h3-margin,
|
|
985
|
+
font-family: typography.$h3-font-family,
|
|
986
|
+
font-size: typography.$h3-font-size,
|
|
987
|
+
font-weight: typography.$h3-font-weight,
|
|
988
|
+
line-height: typography.$h3-line-height,
|
|
989
|
+
color: typography.$h3-color,
|
|
990
|
+
),
|
|
991
|
+
$important: defaults.$use-important,
|
|
992
|
+
$container: $container-name
|
|
993
|
+
);
|
|
994
|
+
|
|
995
|
+
// e.g. `.md:text-h4` or `.lg:text-h4`
|
|
996
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h4";
|
|
997
|
+
|
|
998
|
+
@include utility.create-mapped(
|
|
999
|
+
$selector,
|
|
1000
|
+
(
|
|
1001
|
+
margin: typography.$h4-margin,
|
|
1002
|
+
font-family: typography.$h4-font-family,
|
|
1003
|
+
font-size: typography.$h4-font-size,
|
|
1004
|
+
font-weight: typography.$h4-font-weight,
|
|
1005
|
+
line-height: typography.$h4-line-height,
|
|
1006
|
+
color: typography.$h4-color,
|
|
1007
|
+
),
|
|
1008
|
+
$important: defaults.$use-important,
|
|
1009
|
+
$container: $container-name
|
|
1010
|
+
);
|
|
1011
|
+
|
|
1012
|
+
// e.g. `.md:text-h5` or `.lg:text-h5`
|
|
1013
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h5";
|
|
1014
|
+
|
|
1015
|
+
@include utility.create-mapped(
|
|
1016
|
+
$selector,
|
|
1017
|
+
(
|
|
1018
|
+
margin: typography.$h5-margin,
|
|
1019
|
+
font-family: typography.$h5-font-family,
|
|
1020
|
+
font-size: typography.$h5-font-size,
|
|
1021
|
+
font-weight: typography.$h5-font-weight,
|
|
1022
|
+
line-height: typography.$h5-line-height,
|
|
1023
|
+
color: typography.$h5-color,
|
|
1024
|
+
),
|
|
1025
|
+
$important: defaults.$use-important,
|
|
1026
|
+
$container: $container-name
|
|
1027
|
+
);
|
|
1028
|
+
|
|
1029
|
+
// e.g. `.md:text-h6` or `.lg:text-h6`
|
|
1030
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h6";
|
|
1031
|
+
|
|
1032
|
+
@include utility.create-mapped(
|
|
1033
|
+
$selector,
|
|
1034
|
+
(
|
|
1035
|
+
margin: typography.$h6-margin,
|
|
1036
|
+
font-family: typography.$h6-font-family,
|
|
1037
|
+
font-size: typography.$h6-font-size,
|
|
1038
|
+
font-weight: typography.$h6-font-weight,
|
|
1039
|
+
line-height: typography.$h6-line-height,
|
|
1040
|
+
color: typography.$h6-color,
|
|
1041
|
+
),
|
|
1042
|
+
$important: defaults.$use-important,
|
|
1043
|
+
$container: $container-name
|
|
1044
|
+
);
|
|
1045
|
+
|
|
1046
|
+
// For each font weight property, create a utility class.
|
|
1047
|
+
@each $weight, $value in typography.$font-weights {
|
|
1048
|
+
// e.g. `.md:font-bold` or `.lg:font-normal`
|
|
1049
|
+
$selector: #{$selector-prefix}#{defaults.$font-weight-selector-prefix}#{$weight};
|
|
1050
|
+
|
|
1051
|
+
@include utility.create(
|
|
1052
|
+
$selector,
|
|
1053
|
+
font-weight,
|
|
1054
|
+
$value,
|
|
1055
|
+
$important: defaults.$use-important,
|
|
1056
|
+
$container: $container-name
|
|
1057
|
+
);
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
// For each font style property, create a utility class.
|
|
1061
|
+
@each $style, $value in defaults.$font-style-properties {
|
|
1062
|
+
// e.g. `.md:font-normal` or `.lg:font-italic`
|
|
1063
|
+
$selector: #{$selector-prefix}#{defaults.$font-style-selector-prefix}#{$style};
|
|
1064
|
+
|
|
1065
|
+
@include utility.create(
|
|
1066
|
+
$selector,
|
|
1067
|
+
font-style,
|
|
1068
|
+
$value,
|
|
1069
|
+
$important: defaults.$use-important,
|
|
1070
|
+
$container: $container-name
|
|
1071
|
+
);
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
// For each text transform property, create a utility class.
|
|
1075
|
+
@each $transform, $value in defaults.$text-transform-properties {
|
|
1076
|
+
// e.g. `.md:text-uppercase` or `.lg:text-lowercase`
|
|
1077
|
+
$selector: #{$selector-prefix}#{defaults.$text-transform-selector-prefix}#{$transform};
|
|
1078
|
+
|
|
1079
|
+
@include utility.create(
|
|
1080
|
+
$selector,
|
|
1081
|
+
text-transform,
|
|
1082
|
+
$value,
|
|
1083
|
+
$important: defaults.$use-important,
|
|
1084
|
+
$container: $container-name
|
|
1085
|
+
);
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
}
|