-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add CSS classes to Wegue toolbar buttons #382
Conversation
Hi Christian, sorry for being so quiet lately as other work as keeping me bottled up. |
8e0cad9
to
5f79428
Compare
Hi @fschmenger, good to read from you! Yes I also stumbled upon the the fact that Would you please give it another look and approve, if you're OK with the change? |
Hi Christian, 3 things to consider from my part:
Anyway approved... |
This adds the CSS classes - wgu-toggle-button - wgu-menu-button - wgu-action-button to the Wegue toolbar button component, so they get addressable via (S)CSS.
5f79428
to
18e1c1c
Compare
Thanks for your feedback @fschmenger. I decided to go for the way of having more generic CSS classes:
to be more flexible and future proof here. Theming was not sufficient for my requirement, so adding this classes was necessary to modify the auto-created Wegue toolbar buttons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi team,
Just a word to say that, indeed, the selected solution as of now is the one I personally prefer too. This can be really useful and I like the fact that button classes are defined in terms of usage. Even though class names should not reflect pure technical points, they reflect behaviours here which is totally fine IMHO.
Even though I'm not a big fan of this and think it is a bit overkill, I just wanted to add that some best practices would recommend to define both classes on each button (for example, class="wgu-action-button wgu-geolocator-button"). This is already the case for the overview map button (class="wgu-map-button wgu-overviewmap") and is often done in frameworks (for example, the ZoomToMaxExtent button already has classes v-btn
v-btn--icon
and v-btn--round
from Vuetify on top of which you have the opportunity to add yours).
As I said, I'm not a big fan of this and don't say it should be done that way, just wanted to let you think about it and choose what you think would be the best.
Concerning Felix's idea of putting a placeholder in the CSS files, this would imply to put them in the app-starter
as in a perfect world, we should not change what's inside the src
folder. But this file is currently empty. So should we begin to fill it? Are there other classes that should be there too? Should it be documented somewhere? This interesting idea could lead to a new issue to open and discuss...
I nevertheless approve it as is...
Thanks for your review and the feedback @sronveaux. The additional classes like Some quick words about adding empty rules: I don't think that putting empty CSS rules is a good idea. This could really mess up in the future. Since this has some documentation character we maybe find a better place in the future. In case further discussion is wished, please open up an issue. |
I am going to merge now, thanks for your valuable input @fschmenger and @sronveaux 👍 |
Adds CSS classes
wgu-toggle-button
wgu-geolocator-btn
wgu-localeswitcher-btn
wgu-zoomtomaxextent-btn
to module related buttons in order to easily style the automatically created Wegue module activator buttons (analogous to
wgu-map-button
).