common: integrate terse media style in base
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 4 Jun 2017 21:45:09 +0000 (23:45 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 17 Jul 2017 15:12:55 +0000 (17:12 +0200)
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.

16 files changed:
base.css
circus.css
common.inc.plp
dark.css
keyboard.plp
less.plp
light.css
mono.css
mplayer.plp
mutt.plp
nethack.plp
readline.plp
screen.plp
terse.css [deleted file]
vi.plp
vimperator.plp

index 1e8863761b6c61eb0c1b16ed9fa903c420fb42f0..610cced134c14fca4c759f3ba9ee68899740d24e 100644 (file)
--- 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;
+       }
+}
+
index 67de35a86b672b89e3e991c3f51931785feca3f8..b470470dd5baf7b0d1b5bacb7415955d03a82d04 100644 (file)
@@ -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,
index e5292ba46abd1365258e2ca7e812396deed7cc98..3a51600e9eb061ba031657b0e6e64b36ac1cc519 100644 (file)
@@ -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
index c2571962f80380c9275147ddc4e9bd9f5cee450f..d9098508c5a42c3d4ed32514dc2df2c9562a22e0 100644 (file)
--- 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;
index ac9df32e2edb716ed7aa0a2b347cc2c52a45aee3..9a6952763733aae94a0972a1a09c85cb3cfa320b 100644 (file)
@@ -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,
 });
 
index 52cc5f11cf10f3a8c271bcfd1efffbacede3174f..e1950561dbad56ea785aeb655e7fb3b0431dc3a8 100644 (file)
--- 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,
 });
 
index bf961fe83fca13a596a9ee04940d68b5d3f49ef9..d7604d413d5df1d6a267ccfd7ae8d9a1b0a76d02 100644 (file)
--- 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);
index e62932ec0e828a0735295218b9ee0ccec863acab..364b897795a33a4e1fa920d5b3ee6b1ae79b1c71 100644 (file)
--- 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}
index 3a444d79643ee03799a42186055b526ec821bd41..a45063ca4412a7d2f4f32014f6591f02e01f7299 100644 (file)
@@ -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,
 });
 
index 762a0b15d139bed264ff68e19150718af04a471f..11ff4743dd518252f114c81bbb6b6958ccb08f5b 100644 (file)
--- 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,
 });
 
index 447ad271529632251fd9ea65c232cc4521fce00e..ae595b6f0ea0486dc4bc13589397ec5c1aa581a4 100644 (file)
@@ -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,
 });
 
index 1a0e6381de4c1a85e46803785c712032659826fb..53dc76fbf86000bc971ff596be687be34c8c5afa 100644 (file)
@@ -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,
 });
 
index c075a4e23fb1488b91eb6dca266e27c8ab9e1fd7..aeed94936ff3fcb52bf8be0ecdca5bf100d09036 100644 (file)
@@ -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 (file)
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 deb30ec8895385dde877a2b2e18e044f897dbaba..750bbcf4314fec0a4c0106a155868eff1dd55fa8 100644 (file)
--- 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,
 });
 
index 46bcf6e30e5ac7bfb94677dfc31037af41a0e9d5..638c41146e30eca64085a063718d4c666db133f6 100644 (file)
@@ -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,
 });