diff options
| author | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2021-11-22 23:23:58 -0800 |
|---|---|---|
| committer | Jacob Hoffman-Andrews <github@hoffman-andrews.com> | 2021-11-24 19:41:47 -0800 |
| commit | 3649b90b33acbc0248efa0bc35675081977aefc2 (patch) | |
| tree | a736d200ffcb68ae71bbb604e9edc38c3d4072f8 /compiler/rustc_mir_transform/src/coverage/mod.rs | |
| parent | d2c24aabcddd1eb11af633ab6b7391ae0cd00ea2 (diff) | |
| download | rust-3649b90b33acbc0248efa0bc35675081977aefc2.tar.gz rust-3649b90b33acbc0248efa0bc35675081977aefc2.zip | |
Simplify rendering of stylesheet links into HTML
We carry around a list of stylesheets that can carry two different types of thing: 1. Internal stylesheets specific to a page type (only for settings) 2. Themes In this change I move the link generation for settings.css into settings(), so Context.style_files is reserved just for themes. We had two places where we extracted a base theme name from a list of StylePaths. I consolidated that code to be a method on StylePath. I moved generation of link tags for stylesheets into the page.html template. With that change, I made the template responsible for special handling of light.css (making it the default theme) and of the other themes (marking them disabled). That allowed getting rid of the `disabled` field on StylePath.
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/mod.rs')
0 files changed, 0 insertions, 0 deletions
