Closed
Conversation
ES-Alexander
requested changes
Dec 18, 2024
Collaborator
There was a problem hiding this comment.
Works well - nice work! 😄
-
Would be nice if we included (possibly by adding an extra colour (e.g.
quaternary)):- megamenu item text colour on hover
- At least the navbar items
- This could be applied to the "Try BlueOS" button background too, which is currently static
- Preferably also the items in the menus themselves
- At least the navbar items
- sidebar "selected" page colour (defined in the
ifblocks in thedocs/page.htmltemplate) buttonbackground colour
- megamenu item text colour on hover
-
On the colours themselves, I think the navbar and headings can both be the primary colour, and the colour ordinals should match our style guides, e.g.:
Ordinal BlueOS Cockpit Used By primary #135da3#4fa483page headings(h1-h3), page titles, sidebar sections, navbar secondary #2699d0#135da3links, navbar-hovers (including "Try BlueOS" button background) tertiary #012f46#012f46page headings(h4-h5), sidebar "selected", megamenu background,
button background hoversquaternary #2699d0#2699d0megamenu headings, megamenu item hovers, button background -
Ideally the docs would be able to directly specify the individual colours in the palette, instead of us needing to have a small set of predefined palettes to choose between
- I know it's possible to override CSS variables, so if tailwind needs values for the initial build, maybe we can specify some defaults and then use the docs config to optionally specify overrides (e.g. with a variable-set for
config.extra.palette)?- I tried this, and it worked fine to add the following:
templates/base.html:<link href="{{ config.base_url | safe }}/output.css" rel="stylesheet"> {% if config.extra.palette %} <style> /* override default theme colours */ :root { {% for name, colour in config.extra.palette %}--twc-{{ name }}: {{ colour }};{% endfor %} } </style> {% endif %}
config.toml[extra.palette] navbar = "100 70% 50%" primary = "200 69.1% 48.2%"
- I recommend we do something similar (with the new variables from 2.), perhaps with a separate stylesheet file for the overrides (although I'm personally fine with having that inline in the base template), and add comments in
theme.tomlabout what each variable is for, and to specify they need to be HSL values
- I tried this, and it worked fine to add the following:
- I know it's possible to override CSS variables, so if tailwind needs values for the initial build, maybe we can specify some defaults and then use the docs config to optionally specify overrides (e.g. with a variable-set for
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant to #8