-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Roles: Sub-role in italics instead of bold #615
Conversation
js/functions.js
Outdated
@@ -125,7 +125,7 @@ $( document ).ready(function(){ | |||
if (index > 0) { | |||
blocks += '<br>'; | |||
} | |||
blocks += '<strong>' + resp["subrole-head"] + '</strong>'; | |||
blocks += '<span style="font-style:italic">' + resp["subrole-head"] + '</span>'; |
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.
Isn't italics just <em>
?
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.
I didn't know about <em>
but <i>
didn't work. Isn't this more explicit though? According to https://www.w3schools.com/tags/tag_em.asp , "The content inside is typically displayed in italic." So it isn't always guaranteed?
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.
It doesn't really matter to me, but I like the basic html blocks - let the browser display it in the best way.
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.
I feel the opposite because sometimes what browser thinks is best is not what I intended. Let's see what others say. Thanks for the feedback!
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.
So it isn't always guaranteed?
Indeed it's not. I would still advise to stick with what works, and just be aware that it may look different depending on user setups... which is always the case (pun intended ?) as soon as you reach for something like fonts (and who doesn't ?).
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.
I was tempted not to comment, because it seems like bikeshedding, but then I remembered that I am one of the website maintainers and maybe I should pretend to know something about websites: While it's not in the spec, all browsers I've ever used display <em>
as italics and it's way simpler and way less likely to clash with something else (say, a browsers "reader view", or - more importantly- a screen reader for visually impaired, which will likely have a mechanism to read <em>
in some say that is different form normal text, but is unlikely to do anything useful with CSS markup) because it's the most basic HTML.
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.
OK, changed it to em
and added Marten as co-author. Thanks for your feedback!
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.
Actually, when I look at https://output.circle-artifacts.com/output/job/095470ee-dacf-43ea-ba78-c186ad35f1ee/artifacts/0/html/team.html with this change, it does not appear italic to me. Is it just me?
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.
It's because we explicitly reset the meaning of em
(and a number of other html tags) in this line
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
in our style.css
.
It's done to reduce browser inconsistencies (none of the browser default matter, because it's all defined explicitly by us), on the other hand, that means that we just get the default we defined that that does not make em look any different from normal text.
I'm really not sure what to do, here. I mean, I do know what do to, but I don't want this simple PR to balloon into a redesign of our web styles. We could remove the em
in the line I gave above, thus getting browser defaults again. Or, we could add the following lines to out style.css
:
em {
font-style: italic;
}
which should (not tested) set the font style to italic (making it guaranteed that em is italic on our page for every browser).
But, do we use <em>
tags in other places and would change that? Do we want to review the rest of our website for that? Is it really worth the effort? Is it even worth the effort to write this long a reply?
OK, here's my suggestion: Add
em {
font-style: italic;
}
to style.css. If we used em
in other places and it did not actually emphasize anything, it's abut that we are fixing now.
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.
Thanks! Hopefully I added it correctly. Also added you as co-author.
Also looks like the sub-role is the only thing that is using <em>
.
Result looks good (this is mostly |
Currently, yes, but it would affect also infrastructure if #613 is accepted, and generally any category that splits up into sub-roles. |
Co-authored-by: Marten van Kerkwijk <[email protected]>
c422703
to
a714fad
Compare
Co-authored-by: Hans Moritz Günther <[email protected]>
Weird to have sub-role suddenly be bold font, and thus overshadowing other roles of similar status but just not sub-role.
https://output.circle-artifacts.com/output/job/8e1aeeef-348d-4532-810b-f2420c7a54a8/artifacts/0/html/team.html
xref #519