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

odd character #10

Closed
lovettchris opened this issue May 9, 2022 · 4 comments · Fixed by #77
Closed

odd character #10

lovettchris opened this issue May 9, 2022 · 4 comments · Fixed by #77

Comments

@lovettchris
Copy link
Contributor

This "outputs" block in Functions and Definitions has an odd character prefix "🛈 "

outputs
🛈 "Hello Lean"

I believe it's coming from this CSS, but none of the other outputs listed have this prefix:

code.info::before {
    content: "🛈 ";
    font-style: normal;
}
@david-christiansen
Copy link
Collaborator

In the yet-unwritten "Typographical conventions" section of the introduction, it will distinguish between three types of literal block: those that contain code submitted to Lean, those that contain informative replies from Lean (e.g. the result of #check or #eval), and those that contain error messages. The former is unmarked and will eventually get highlighting, while the latter two are marked. Right now, it happens with little "info" and "error sign" characters combined with some font changes.

How are you seeing this? On my computer, the issue looks like this:
Screenshot from 2022-05-10 06-45-45

If common computer setups don't have this character in their font, then I definitely need to do something else (e.g. a little image, or a different background).

@lovettchris
Copy link
Contributor Author

I see, thanks for the explanation. I see the "i" with a circle around it, so yes it is coming through, font substitution in web browsers works pretty well these days. If you are unsure it works on all devices, you could instead use a symbol from https://fontawesome.com/v4/icons/ and explicitly include this font in your website ... it has a nice info circle - I also think playing with the fontsize a bit would help distinguish it from the rest of the text. Perhaps even figuring out how to make it float off the left margin or something would make it clear this is just a separate indicator and not part of the "expected output text".
image

@david-christiansen
Copy link
Collaborator

This is great feedback. I'll look into some options for a more clear presentation - this one was quick to implement, but as you can see, it needs replacing with something better now.

Thanks!

@lovettchris
Copy link
Contributor Author

This seems to work:

custom.css:

code.info:before {
  content: "\f05a";
  font-family: "FontAwesome";
  font-style: normal;
  font-size: 12pt;
  margin-left: -30px;
  display: block;
  position: absolute;
  color: #718c00
}

code.info {
  font-style: italic;
}


code.error:before {
  content: "\f071";
  font-family: "FontAwesome";
  font-style: normal;
  font-size: 12pt;
  margin-left: -30px;
  display: block;
  position: absolute;
  color: #ff0000;
}

code.error {
  color: #ff0000;
}

Which appears like this:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants