@Yemisrach15
Posted
Hi Graham, good job but this needs a bit of work on responsiveness for tablet sized viewport. A few suggestions,
section
element needs a heading.- The cards inside
section
imo should bearticle
for better semantics.article
s are used for self-contained information and it is appropriate to use them in this case. input
needs label for accessibility purpose as your report says.
For your question, I prefer using dataset attributes on a container (eg. body). Inside the javascript code, I change this dataset's value based on user's preference and inside the CSS I do something like
:root {
<your css color variables for light mode>
}
[data-theme="dark"] {
<your css color variables for dark mode>
}
This is assuming a container such as body
has a data-theme
attribute. It's only my preference since it needs less js code :)
Marked as helpful
@GrahamTheobald
Posted
@Yemisrach15 Thank you very much for your feedback, it is noted and appreciated (: