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

hide_in_print option won’t work for nhsuk brand #448

Open
paulrobertlloyd opened this issue Sep 23, 2023 · 3 comments
Open

hide_in_print option won’t work for nhsuk brand #448

paulrobertlloyd opened this issue Sep 23, 2023 · 3 comments

Comments

@paulrobertlloyd
Copy link
Contributor

Looking through #422, I noticed that this PR assumes that a brand will a.) follow the GOV.UK Design System’s class naming convention and b.) provide the same utility classes. Sadly, for the case of NHS.UK Frontend (which what we really mean by brand right now), that’s not always true.

Fortunately, the only place this is a problem is for the #{brand}-!-display-none-print class, which is used on a few components where hide_in_print is set to true.

There is currently no equivalent utility class in NHS.UK Frontend, and even if there were, that project uses -u- for utility classes, just to be different.

Given this hide_in_print option, I was wondering if it makes sense to provide the necessary styles in this library. But, this library doesn’t provide component styles.

In which case, authors would need to provide their own CSS:

@include mq($media-type: print) {
  .nhsuk-\!-display-none-print {
    display: none !important;
  }
}

Is it worth adding a note in the documentation? I note the brand option isn’t included anyway, so maybe this is all a hidden feature and I should keep quiet 😆

@peteryates
Copy link
Member

peteryates commented Sep 23, 2023

This is the kind of difference that stopped me from officially supporting NHS.UK Frontend in the form builder. The vast majority of functionally just worked but there were a few rough edges.

With some work and a little config it would be feasible to support both. There's a chance they'll drift apart which would increase the support burden though.

I think, if anywhere, this should be in the technical documentation rather than the guide - I think only a niche within niche within a niche of users will find it useful 😅

@paulrobertlloyd
Copy link
Contributor Author

paulrobertlloyd commented Sep 23, 2023

I’m currently in that niche, for my sins.

Let me know if/where I can should add the above recommendation – not sure what you mean by technical documentation, unless you mean the README!

@frankieroberto
Copy link
Collaborator

Do we know if there's any plan to keep the NHS and GOV.UK design systems in dynamic alignment (ie components use same HTML but with different prefixes in the class name), or if it's inevitable that they’ll diverge?

If they’re likely to diverge, I wonder if maintaining a fork would be better, longer-term?

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

No branches or pull requests

3 participants