From 6ab9c94cde0ca32c221dc3120f0088e1693e71c1 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 4 Jun 2017 23:45:09 +0200 Subject: [PATCH] common: integrate terse media style in base Move rules for more compact keyboard into base include to save a (serial so delayed) request. Users can always resize their browser to enable this style (and not just for light colours), so advantages of keeping it separate are minimal. --- base.css | 20 ++++++++++++++++++++ circus.css | 1 - common.inc.plp | 2 +- dark.css | 1 - keyboard.plp | 2 +- less.plp | 2 +- light.css | 1 - mono.css | 1 - mplayer.plp | 2 +- mutt.plp | 2 +- nethack.plp | 2 +- readline.plp | 2 +- screen.plp | 2 +- terse.css | 18 ------------------ vi.plp | 2 +- vimperator.plp | 2 +- 16 files changed, 30 insertions(+), 32 deletions(-) delete mode 100644 terse.css diff --git a/base.css b/base.css index 1e88637..610cced 100644 --- a/base.css +++ b/base.css @@ -723,3 +723,23 @@ nav > .section { ul.legend-set {display: none} /* current options only relevant on dynamic media */ } +/* terse optimisation */ + +@media (max-width: 79em) { + body .keys td { + position: relative; /* hides overflow */ + width: 4.5em; + } + body .keys td b, + body .keys.meta td b, + body .keys.ctrl td b, + body .keys.lead td b { /* leading chars always fit */ + position: absolute; /* background */ + right: 0; /* least overlap in corner */ + font-size: 250%; + line-height: 2.5ex; + opacity: .5; + color: #FFF; + } +} + diff --git a/circus.css b/circus.css index 67de35a..b470470 100644 --- a/circus.css +++ b/circus.css @@ -1,5 +1,4 @@ @import url(base.css); -@import url(terse.css) all and (max-width: 79em); .l1 {background: #F77} .l1:hover a, .l1:hover a:visited, diff --git a/common.inc.plp b/common.inc.plp index e5292ba..3a51600 100644 --- a/common.inc.plp +++ b/common.inc.plp @@ -105,7 +105,7 @@ sub Html { } # default fallbacks - $meta->{stylesheet} ||= [qw'light dark circus mono red terse']; + $meta->{stylesheet} ||= [qw( light dark circus mono red )]; $meta->{charset} ||= 'utf-8'; # convert options to arrays diff --git a/dark.css b/dark.css index c257196..d909850 100644 --- a/dark.css +++ b/dark.css @@ -1,5 +1,4 @@ @import url(base.css); -@import url(terse.css) all and (max-width: 79em); body { background: #000; diff --git a/keyboard.plp b/keyboard.plp index ac9df32..9a69527 100644 --- a/keyboard.plp +++ b/keyboard.plp @@ -3,7 +3,7 @@ Html({ title => 'keyboard cheat sheet', version => '1.0', - stylesheet => [qw'light dark circus mono red terse'], + stylesheet => [qw( light dark circus mono red )], keys => 1, }); diff --git a/less.plp b/less.plp index 52cc5f1..e195056 100644 --- a/less.plp +++ b/less.plp @@ -11,7 +11,7 @@ Html({ less sheet cheat keys pager more shortkey reference keyboard commands options overview '], - stylesheet => [qw'light dark circus mono red terse'], + stylesheet => [qw( light dark circus mono red )], keys => 1, }); diff --git a/light.css b/light.css index bf961fe..d7604d4 100644 --- a/light.css +++ b/light.css @@ -1,3 +1,2 @@ @import url(base.css); -@import url(terse.css) all and (max-width: 79em); @import url(mono.css) all and (monochrome); diff --git a/mono.css b/mono.css index e62932e..364b897 100644 --- a/mono.css +++ b/mono.css @@ -1,5 +1,4 @@ @import url(base.css); -@import url(terse.css) all and (max-width: 79em); a:active, a:visited:active, a:hover, a:visited:hover {color: inherit} diff --git a/mplayer.plp b/mplayer.plp index 3a444d7..a45063c 100644 --- a/mplayer.plp +++ b/mplayer.plp @@ -10,7 +10,7 @@ Html({ keywords => [qw' mplayer video media sheet cheat reference overview control shortkey keyboard '], - stylesheet => [qw'light dark circus mono red terse'], + stylesheet => [qw( light dark circus mono red )], keys => 1, }); diff --git a/mutt.plp b/mutt.plp index 762a0b1..11ff474 100644 --- a/mutt.plp +++ b/mutt.plp @@ -10,7 +10,7 @@ Html({ keywords => [qw' mutt MUA email client sheet cheat reference overview commands keyboard '], - stylesheet => [qw'light dark circus mono red terse'], + stylesheet => [qw( light dark circus mono red )], keys => 1, }); diff --git a/nethack.plp b/nethack.plp index 447ad27..ae595b6 100644 --- a/nethack.plp +++ b/nethack.plp @@ -10,7 +10,7 @@ Html({ keywords => [qw' nethack rogue game control controls sheet reference overview keyboard '], - stylesheet => [qw'light dark circus mono red terse'], + stylesheet => [qw( light dark circus mono red )], keys => 1, }); diff --git a/readline.plp b/readline.plp index 1a0e638..53dc76f 100644 --- a/readline.plp +++ b/readline.plp @@ -10,7 +10,7 @@ Html({ keywords => [qw' readline gnu bash emacs sheet cheat reference overview keyboard editing curses '], - stylesheet => [qw'light dark circus mono red terse'], + stylesheet => [qw( light dark circus mono red )], keys => 1, }); diff --git a/screen.plp b/screen.plp index c075a4e..aeed949 100644 --- a/screen.plp +++ b/screen.plp @@ -11,7 +11,7 @@ Html({ screen sheet cheat reference overview commands keyboard terminal window manager '], - stylesheet => [qw'light dark circus mono red terse'], + stylesheet => [qw( light dark circus mono red )], keys => 1, }); diff --git a/terse.css b/terse.css deleted file mode 100644 index e0581c7..0000000 --- a/terse.css +++ /dev/null @@ -1,18 +0,0 @@ -@import url(base.css); - -body .keys td { - position: relative; /* hides overflow */ - width: 4.5em; -} -body .keys td b, -body .keys.meta td b, -body .keys.ctrl td b, -body .keys.lead td b { /* leading chars always fit */ - position: absolute; /* background */ - right: 0; /* least overlap in corner */ - font-size: 250%; - line-height: 2.5ex; - opacity: .5; - color: #FFF; -} - diff --git a/vi.plp b/vi.plp index deb30ec..750bbcf 100644 --- a/vi.plp +++ b/vi.plp @@ -10,7 +10,7 @@ Html({ keywords => [qw' vi vim nvi sheet cheat reference overview commands keyboard '], - stylesheet => [qw'light dark circus mono red terse'], + stylesheet => [qw( light dark circus mono red )], keys => 1, }); diff --git a/vimperator.plp b/vimperator.plp index 46bcf6e..638c411 100644 --- a/vimperator.plp +++ b/vimperator.plp @@ -11,7 +11,7 @@ Html({ vimperator firefox vim iceweasel sheet cheat reference overview commands keyboard browser '], - stylesheet => [qw'light dark circus mono red terse'], + stylesheet => [qw( light dark circus mono red )], keys => 1, }); -- 2.30.0