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

Private styles? inline vs class? #29

Closed
NickColley opened this issue Mar 28, 2017 · 2 comments
Closed

Private styles? inline vs class? #29

NickColley opened this issue Mar 28, 2017 · 2 comments
Labels
Question: decision-making User queries product decisions

Comments

@NickColley
Copy link
Contributor

I suppose you could argue that you only should expose things that can be themed so this may be fine?

https://github.com/alphagov/accessible-typeahead/blob/enhance-select-element/src/status.jsx#L42

@tvararu
Copy link
Contributor

tvararu commented Mar 28, 2017

The aria status region uses inline styling to visually hide it. Everything else is themed using regular CSS.

This is intentional. Users can get confused why stuff they don't expect to show up shows up and not know how to fix it, when using other similar typeaheads.

Worth noting that the typeahead used to have a lot more inline styling relating to critical functionality and usability (like overlaying using absolute positioning), but it was abstracted out in the CSS.

There's pros and cons to either approach with some advocating that the best would be to just pull everything into CSS but I think the current way it works is alright.

@NickColley
Copy link
Contributor Author

Seems like current approach is good for users because consumers can't accidentally hide the information in an odd way but it means that this component must be updated which seems reasonable because then others have an easy way to update.

@tvararu tvararu added Question: decision-making User queries product decisions wontfix labels Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question: decision-making User queries product decisions
Projects
None yet
Development

No branches or pull requests

2 participants