Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Generate the theme.json file rather than a custom json object #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bacoords
Copy link
Member

@bacoords bacoords commented Mar 3, 2022

The goal here is to use this postcss plugin to generate a theme.json file for Understrap rather than our custom understrap_generate_color_palette(). We could just pass colors, but I'd like to pass as much theme styles as possible, potentially matching all of the typography options, etc and even adding support for gradients/duotones.

  • [] Make it opt-in via options so that older sites don't use this
  • [] Needs a matching PR on Understrap that passes more BS variables to CSS variables so we can parse them in postcss. See example below
  • [] Still needs a lot of working matching the theme.json specs
  • [] Causes some minor issues with the layout on the backend, so we need to pass some container sizes or something

Add any values we need to src/sass/theme/_understrap.scss

:root {
	--understrap-spacer: #{$spacer};
	--understrap-border-radius: #{$border-radius};
	--understrap-link-color: #{$link-color};
	--understrap-fs1: #{$h1-font-size};
	--understrap-fs2: #{$h2-font-size};
        --understrap-fs3: #{$h3-font-size};
	--understrap-fs4: #{$h4-font-size};
	--understrap-fs5: #{$h5-font-size};
	--understrap-fs6: #{$h6-font-size};
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant