Commit Graph

400 Commits

Author SHA1 Message Date
Eric Huss 2c710d3b7d
Merge pull request #1987 from ehuss/theme-fonts
Make fonts part of the theme.
2023-02-08 15:56:40 -08:00
Eric Huss 734936d819 Add some comments about overflow-x 2023-02-08 15:25:14 -08:00
Skwodo ca46086e79 fix overflow-x on mobile 2023-01-21 22:41:01 +01:00
Noritada Kobayashi dcc9efea0a Remove the WebKit-specific scrollbar styling altogether
It is preferable to remove WebKit-specific styling and use the browser
and OS default scrollbars.
Thanks to comments from @julianfortune, @arniu, and @ehuss.

Closes #1483.
2023-01-18 23:51:09 +09:00
Eric Huss c2d973997a Make fonts part of the theme. 2023-01-15 11:42:46 -08:00
Noritada Kobayashi 1ba2c063e0 Thin scrollbars in Chrome and Safari to make them less assertive (#1483) 2022-12-22 15:40:03 +09:00
armandocumate cf1557e454 update for hidden only on clipboard 2022-12-14 06:54:45 -08:00
LePichu e3c484af01 fix: random ref in 2022-12-06 12:05:11 +05:30
Eric Huss f32bd6f945 Show the currently selected theme. 2022-11-21 15:27:39 -08:00
Eric Huss f64fcbc07d Fix clipping in theme popup 2022-11-21 14:00:18 -08:00
Aman Verma db092a404e State canonical URL using <link> not <meta>.
The Google SEO docs describe using the link element to specify the canonical
page in a redirect. They don't mention anything about <meta>.
2022-11-12 14:54:28 -06:00
Aman Verma edda3d1b51 Fix formatting of content attr in <meta http-equiv=refresh>
According to the HTML specification[1], there needs to be a space after the
semicolon and the URL must be unquoted.

[1]: https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-refresh
2022-11-12 14:47:21 -06:00
Aman Verma 27a11e7b35 Don't generate obsolete charset attrs in <script>.
According to the HTML specification[1], the charset attribute is obsolete in
script elements.

[1]: https://html.spec.whatwg.org/multipage/obsolete.html#HTMLScriptElement-partial
2022-11-12 14:45:09 -06:00
Aman Verma cfd4c93d88 Don't generate redundant <meta http-equiv=content-type>.
Quoting from the HTML specification[1]:

  A document must not contain both a meta element with an http-equiv attribute
  in the Encoding declaration state and a meta element with the charset
  attribute present.

So we remove the <meta> with the http-equiv attribute from our template.

[1]: https://html.spec.whatwg.org/multipage/semantics.html#attr-meta-http-equiv-content-type
2022-11-12 14:27:52 -06:00
armandocumate 3fc036e01a fi xcopying invisible text 2022-10-14 16:53:59 -07:00
Brett Chalupa 79c159d123 Add styles for <kbd> elements
Allows for special styles to call them out since they're different than
normal text and different than code. They can make use of styles they
inherit for font style and weight.

Notes on changes:

- Added new CSS variables for reused elements
- The font-* rules are separate for each aspect so that they can inherit
  bold/italic/etc

Closes https://github.com/rust-lang/mdBook/issues/1813
2022-10-06 16:02:29 -04:00
Dylan DPC 66bf85b14f Require Rust 2021 edition
This allows us to clean up and simplify the code.
2022-09-09 16:00:35 +02:00
Guillaume Gomez 76b0493fb0 Remove unneeded type attribute for <script> 2022-08-29 21:07:50 +02:00
Steven Engler 6a4ba95926 Fixed code padding in headings 2022-07-13 19:12:33 -04:00
Eric Huss cbf0ca027d
Merge pull request #1806 from ehuss/button-overlap
Make code buttons appear on hover (or tap on mobile)
2022-06-27 13:58:17 -07:00
Eric Huss 5f00625c14
Merge pull request #1617 from lf-/x-overflow
Fix some x overflows
2022-06-27 11:01:48 -07:00
Eric Huss 2b903ad057 Make code block icons appear on hover. 2022-06-01 18:48:34 -07:00
Eric Huss 37d756ae75 Adjust overlap of code buttons with code blocks. 2022-05-16 19:27:46 -07:00
Clark 6899d94027 livereload uses host&port of current page; livereload works with a HTTPS site 2022-03-19 04:38:16 +08:00
Jade Lovelace 4ae7ab5e87 switch to break-word as suggested 2022-01-27 18:42:39 -08:00
Jade 59569984e2 Address review: use overflow-wrap everywhere 2022-01-27 18:41:31 -08:00
Jade 85df785cd3 Wrap tables in an overflow-x wrapper div 2022-01-27 18:41:30 -08:00
Jade fde88c22a8 Fix an x overflow with long inline code
Spotted on
https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html
2022-01-27 18:39:09 -08:00
Ingu Kang bbaa0ea1fa Prevent iOS Safari from enlarging text in landscape orientation
referernces:
  - https://developer.mozilla.org/en-US/docs/Web/CSS/text-size-adjust#basic_disabling_usage
  - https://trac.webkit.org/changeset/261940/webkit
2021-11-13 15:37:20 +09:00
Ivan Tham e4a46c9477
Remove extra semicolon in variables.css 2021-10-03 22:23:09 +08:00
Ivan Tham 6ae5c686d9
Remove extra semicolon in variables.css 2021-10-03 22:19:51 +08:00
Michael Howell 4251d7a838 Only switch to themes on buttons that have the `theme` class
Fixes #1649
2021-09-14 10:05:35 -07:00
Eric Huss 68d8ceec47 Revert #1597 - Update to highlight.js 11.0. 2021-08-02 08:02:13 -07:00
Eric Huss 6dd785ea6c Update to highlight.js 11.0. 2021-07-26 12:40:28 -07:00
FWYongxing 49ef7b6f02 Don't highlight `inline code` blocks in headers with output.html.playpen(playgroud).editable=true 2021-07-27 01:02:17 +08:00
Eric Huss 8fb6ac7987
Merge pull request #1599 from notriddle/notriddle/play-button-no-output
feat(playground): show "No output" on playgrounds that print nothing
2021-07-08 13:17:15 -07:00
Michael Howell 82d32ee761 feat(playground): show "No output" on playgrounds that print nothing
Fixes #1594
2021-07-07 10:44:51 -07:00
josh rotenberg ebdab38a32 remove debugging 2021-07-04 20:25:04 -07:00
josh rotenberg b87c231fc3 first pass at 2021 support 2021-07-04 14:44:23 -07:00
Eldred Habert 3ee22fb430
Apply max width to video as well as images
Since videos are essentially animated images, this same max width makes sense for both.
2021-05-23 16:10:26 +02:00
Eric Huss a72d6002b7
Merge pull request #1506 from flavio/feature/suggest-an-edit-link
Feature/suggest an edit link
2021-04-26 11:03:50 -07:00
Guillaume Gomez c1d982d92b Remove duplicate "name" attribute on input 2021-04-24 17:27:49 +02:00
Jonas Berlin bbf54d7459
[ReviewFix] Replace edit baseurl with template and make visibility independent of git_repository_url. 2021-04-19 16:16:08 +02:00
Jonas Berlin b3670ece0e
Add "Suggest an edit" link next to "Git repository"
Includes new configuration option `git-repository-edit-baseurl` for
supporting non-GitHub repository layouts.
2021-04-19 14:51:14 +02:00
Eric Huss c83bbd6319
Merge pull request #1463 from ehuss/fix-header-scroll
Fix some issues with fragment scrolling and linking.
2021-02-22 14:50:17 -08:00
Tim Small 7f59fdd9bd Enhance text contrast of `light` theme to improve accessibility.
The existing light theme has relatively low contrast between the text
(and other UI elements) and background (especially within code blocks).
This presents difficulties for people with reduced visual contrast
perception (common in older adults).

This patch makes changes to the default `light` theme to meet the
minimum contrast requirement of the v2.1 W3C WCAG (Web Content
Accessibility Guidelines)
https://www.w3.org/WAI/WCAG21/quickref/#contrast-minimum

The small size, and slender font used for the title text makes it hard
to read, even with the increased contrast colour scheme, so this patch
also increases the size of the title text font by 20%.

Closes #1442
2021-02-21 14:35:10 +00:00
Eric Huss 45d41eac5f Fix some issues with fragment scrolling and linking. 2021-02-12 16:37:07 -08:00
Eric Huss 1a0c296532
Merge pull request #1426 from ehuss/search-mark-words
Fix search highlighting with multiple words.
2021-01-14 17:01:52 -08:00
Eric Huss 09e7bb76dc
Remove mark from URL on escape. (#1427) 2021-01-05 19:31:16 +01:00
Eric Huss 28387130c0 Fix search highlighting with multiple words. 2021-01-04 14:20:36 -08:00