7e86fd61e8
Based on https://github.com/rust-lang/rust/pull/115812#issuecomment-1717960119 Having them in separate files used to make more sense, before the migration to CSS variables made the theme files as small as they are nowadays. This is already how docs.rs and mdBook do it.
12 lines
436 B
Makefile
12 lines
436 B
Makefile
include ../tools.mk
|
|
|
|
# Test that rustdoc will properly load in a theme file and display it in the theme selector.
|
|
|
|
OUTPUT_DIR := "$(TMPDIR)/rustdoc-themes"
|
|
|
|
all:
|
|
awk '/Begin theme: light/ {in_theme=1;next} /End theme:/ {in_theme=0} { if (in_theme) print }' \
|
|
< '$(S)/src/librustdoc/html/static/css/noscript.css' > '$(TMPDIR)/test.css'
|
|
$(RUSTDOC) -o $(OUTPUT_DIR) foo.rs --theme $(TMPDIR)/test.css
|
|
$(HTMLDOCCK) $(OUTPUT_DIR) foo.rs
|