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

Option to add ribbon to engineblock pages indication which environmen… #1269

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

thijskh
Copy link
Member

@thijskh thijskh commented Sep 20, 2023

…t you're working on

When left empty, nothing is shown.

The approach may look a bit unwieldy, but this is done so that envirnment specific config can be passed to CSS. This is making it a pure CSS solution that also would work in installs that have a CSP that disables inline styles, that's why we have to enumerate the available colors since you cannot use attr() with anything other than content:.

@thijskh thijskh requested a review from MKodde September 20, 2023 13:46
@MKodde
Copy link
Member

MKodde commented Sep 21, 2023

I like this solution. And TIL: you can safely use attr in :before and :after pseudoselectors. Caniuse first confused me in that aspect. But after reading on, the widespread support for attr() in content selectors lifted my concerns.

See: https://caniuse.com/?search=css%20attr()

What might be a good addition to this PR:

  1. Add some user documentation on how to get the ribbon.
  2. Make sure to state the colors that are currently supported.

@thijskh thijskh force-pushed the feature/env-specific-ribbon branch from 8045f06 to 93e727a Compare September 26, 2023 04:43
…t you're working on

When left empty, nothing is shown.

The approach may look a bit unwieldy, but this is done so that envirnment
specific config can be passed to CSS. This is making it a pure CSS solution
that also would work in installs that have a CSP that disables inline styles,
that's why we have to enumerate the available colors since you cannot use
`attr()` with anything other than `content:`.
@thijskh thijskh force-pushed the feature/env-specific-ribbon branch from 93e727a to cdb012c Compare September 26, 2023 09:49
Also make the codes match the actual HTML color names for simplicity.
@thijskh
Copy link
Member Author

thijskh commented Sep 27, 2023

I have documented such in parameters.yml.dist and also created some docs in the EB wiki.

@thijskh thijskh merged commit 65c3628 into master Sep 27, 2023
2 checks passed
@thijskh thijskh deleted the feature/env-specific-ribbon branch September 27, 2023 12:50
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.

2 participants