-
Notifications
You must be signed in to change notification settings - Fork 329
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
Should the iff
function be public or namespaced?
#1735
Comments
We could also consider removing if and just using Sass' built-in Have we seen any evidence of this causing issues for users? |
No evidence other than when generating the Sass docs it creates an inconsistency and we'd then be promoting something that feels like we made a mistake on. I also think there's likely not much use of this function yet so would prefer sort it out before having it document, or as my preference would be to make it private. We could make it private without changing the name of course.
Would be up for avoiding it entirely if that's an option. |
For context, this was added as 'syntactic sugar' for situations like this: @mixin govuk-typography-weight-regular($important: false) {
font-weight: $govuk-font-weight-regular iff($important, !important);
} Sass' default .foo {
font-weight: $govuk-font-weight-regular if($important, !important, "");
} |
- make the function a private function to indicate it should not be used. - add warning and deprecation sassdoc to indicate it will be removed in the future. #1735
Closing in favour of #1771 as we've made a decision and I believe the original issue has been resolved. |
Something I noticed when doing the work to show the sass docs is that the
iff
function is the odd one out. It is public but does not havegovuk-
namespace.Proposals
_iff
and updating sass docsgovuk-iff
My preference would be to make it private since it's not a GOV.UK Frontend specific thing and is really an internal function.
The text was updated successfully, but these errors were encountered: