Skip to content

Commit 39475f2

Browse files
committed
fix: Switch dimmed to font-weight: lighter
This is what the wikipedia article says a terminal *might* do.
1 parent 368a871 commit 39475f2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

crates/anstyle-svg/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ fn write_effects_in_use(buffer: &mut String, elements: &[adapter::Element]) {
414414
.unwrap();
415415
}
416416
if effects_in_use.contains(anstyle::Effects::DIMMED) {
417-
writeln!(buffer, r#" .dimmed {{ opacity: 0.7; }}"#).unwrap();
417+
writeln!(buffer, r#" .dimmed {{ font-weight: 100; }}"#).unwrap();
418418
}
419419
if effects_in_use.contains(anstyle::Effects::HIDDEN) {
420420
writeln!(buffer, r#" .hidden {{ opacity: 0; }}"#).unwrap();

crates/anstyle-svg/tests/rainbow.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@
786786
.dotted-underline { text-decoration-line: underline; text-decoration-style: dotted; }
787787
.dashed-underline { text-decoration-line: underline; text-decoration-style: dashed; }
788788
.strikethrough { text-decoration-line: line-through; }
789-
.dimmed { opacity: 0.7; }
789+
.dimmed { font-weight: 200; }
790790
.hidden { opacity: 0; }
791791
span {
792792
font: 14px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;

crates/anstyle-svg/tests/rainbow.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)