scala / scala3

The Scala 3 compiler, also known as Dotty.
https://dotty.epfl.ch
Apache License 2.0
5.87k stars 1.06k forks source link

Scaladoc emphasis not apparent #17980

Open matil019 opened 1 year ago

matil019 commented 1 year ago

Compiler version

$ scalac --version; scaladoc --version
Scala compiler version 3.3.0 -- Copyright 2002-2023, LAMP/EPFL
Scaladoc version 3.3.0 -- Copyright 2002-2023, LAMP/EPFL

Minimized code

Foo.scala:

/** This phrase is meant to be __emphasized!__ */
class Foo

Then run:

scalac Foo.scala
scaladoc *.tasty

Output

Open the generated file with a browser, and the comment is not rendered emphasized.

It seems on HTML file the comment is emphasized as intended:

$ grep 'This phrase is' output/_empty_/Foo.html
  <p>This phrase is meant to be <strong>emphasized!</strong></p>

but it is not apparent when viewed on a browser because the CSS style font-weight is overridden by bundle.css:

$ head -n4 output/styles/theme/bundle.css
* {
  /*text-rendering: geometricPrecision;*/
  font-weight: initial;
}

Expectation

<strong> texts in generated HTML files should be rendered emphasized on browsers.

Dedelweiss commented 1 year ago

Hello, thank you @matil019 for your issue. Based on my tests, removing the font-weight:initial doesn't have much effect on the rest of the style of the documentation apart from an increase in the font-weight of the headings (which I could easily correct if necessary). Now I'd prefer one of the authors to confirm that it doesn't serve any other purpose.