Em Zhan
72b3227824
Fix flicker when setting sidebar scroll position
...
Previously, sidebar scroll was set in an external script which caused a
flicker as the sidebar is initially rendered without any scroll before
being scrolled to the desired location.
Switching to an inline script right after the HTML tags for the sidebar
seems to avoid the flicker in most cases. In addition, logic is added to
avoid scrolling jumps when navigating via links within the sidebar.
2023-06-21 19:25:21 -05:00
Em Zhan
1ef8d70ac4
Avoid menu border flash during page navigation
...
Partially addresses #443
2023-06-17 21:42:54 -05:00
Jannik Obermann
7df1d8c838
Support hidden lines in languages other than Rust
...
Co-Authored-By: thecodewarrior <5467669+thecodewarrior@users.noreply.github.com>
2023-05-28 14:04:54 -07:00
Andreas Deininger
a2c88ae0f1
Convert links from http to https protocol
2023-04-02 21:35:08 +02:00
Eric Huss
703a215ef8
Merge pull request #2039 from Skwodo/master
...
Change overflow-x hidden to clip
2023-03-04 14:05:01 -08:00
Skwodo
f5f96bc4f4
change overflow-x hidden to clip
2023-03-02 21:01:38 +01:00
Roy Wellington Ⅳ
fa6aa2ced8
Default the sidebar to visible in large screens
...
The code here leads me to believe that the intention is for the sidebar
to be default visible on large screens (where `clientWidth` > 1080) and
hidden otherwise.
However, as previously written, if the `localStorage.getItem` call fails
(for example, if the user agent is not accepting cookies), then we fall
back to `sidebar = sidebar || 'visible';` — but `sidebar` is already set
to `hidden`, so the `|| 'visible'` never happens.
This results in the sidebar hiding itself on every navigation through an
mdBook, meaning if you're just switching between sections trying to find
something that you keep needing to re-open the sidebar.
2023-02-11 18:04:58 -05:00
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