From 036a2cb66272a22b339bd7a861330b7728b55f97 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Sat, 28 Oct 2023 19:43:22 +0400 Subject: [PATCH] Moved to kiwix.css some CSS with global effect Moved from index.css into kiwix.css some CSS with global effect thus making it apply to the viewer too. Extra font-size directives in taskbar.css are needed to undo the effect of 'font-size: 62.5%' now applied to the 'html' element type. --- static/skin/index.css | 22 ---------------------- static/skin/kiwix.css | 22 ++++++++++++++++++++++ static/skin/taskbar.css | 4 +++- test/library_server.cpp | 4 ++-- test/server.cpp | 14 +++++++------- 5 files changed, 34 insertions(+), 32 deletions(-) diff --git a/static/skin/index.css b/static/skin/index.css index 9978ded3e..0595360c4 100644 --- a/static/skin/index.css +++ b/static/skin/index.css @@ -1,25 +1,3 @@ -*, -*::after, -*::before { - margin: 0; - padding: 0; - box-sizing: inherit; -} - -html { - font-size: 62.5%; -} - -body { - position: relative; - box-sizing: border-box; -} - -::selection { - background-color: #00b4e4; - color: white; -} - .kiwixNav { background-color: #f4f6f8; width: 100%; diff --git a/static/skin/kiwix.css b/static/skin/kiwix.css index 9f5c05745..d46cff845 100644 --- a/static/skin/kiwix.css +++ b/static/skin/kiwix.css @@ -1,3 +1,25 @@ +*, +*::after, +*::before { + margin: 0; + padding: 0; + box-sizing: inherit; +} + +html { + font-size: 62.5%; +} + +body { + position: relative; + box-sizing: border-box; +} + +::selection { + background-color: #00b4e4; + color: white; +} + .modal-wrapper { position: fixed; z-index: 100; diff --git a/static/skin/taskbar.css b/static/skin/taskbar.css index f73b77304..fd4d1442d 100644 --- a/static/skin/taskbar.css +++ b/static/skin/taskbar.css @@ -21,6 +21,7 @@ } .kiwixsearch { + font-size: 1.6rem; position: relative; height: 26px; width: 100%; @@ -119,6 +120,7 @@ label[for=kiwixsearchbox] { } a.suggest, a.suggest:visited, a.suggest:hover, a.suggest:active { + font-size: 1.6rem; display: block; text-decoration: none; color: inherit; @@ -142,7 +144,7 @@ a.suggest, a.suggest:visited, a.suggest:hover, a.suggest:active { } #uiLanguageSelector .modal-content #ui_language { - font-size: 1rem; + font-size: 1.6rem; width: 100%; } diff --git a/test/library_server.cpp b/test/library_server.cpp index 8497b4433..04465684d 100644 --- a/test/library_server.cpp +++ b/test/library_server.cpp @@ -1028,12 +1028,12 @@ TEST_F(LibraryServerTest, no_name_mapper_catalog_v2_individual_entry_access) " Welcome to Kiwix Server\n" \ " \n" \ " \n" \ " \n" \ diff --git a/test/server.cpp b/test/server.cpp index 9eecf7709..2f2d72263 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -61,7 +61,7 @@ const ResourceCollection resources200Compressible{ { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/i18n.js" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/i18n.js?cacheid=6a8c6fb2" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/index.css" }, - { STATIC_CONTENT, "/ROOT%23%3F/skin/index.css?cacheid=624104e6" }, + { STATIC_CONTENT, "/ROOT%23%3F/skin/index.css?cacheid=081e1606" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/index.js" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/index.js?cacheid=ce19da2a" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/iso6391To3.js" }, @@ -71,7 +71,7 @@ const ResourceCollection resources200Compressible{ { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/mustache.min.js" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/mustache.min.js?cacheid=bd23c4fb" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css" }, - { STATIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css?cacheid=786a623c" }, + { STATIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css?cacheid=04cb5531" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/viewer.js" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/viewer.js?cacheid=201653b8" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/fonts/Poppins.ttf" }, @@ -141,7 +141,7 @@ const ResourceCollection resources200Uncompressible{ { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/hash.png" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/hash.png?cacheid=f836e872" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/kiwix.css" }, - { STATIC_CONTENT, "/ROOT%23%3F/skin/kiwix.css?cacheid=28889647" }, + { STATIC_CONTENT, "/ROOT%23%3F/skin/kiwix.css?cacheid=bdae4d22" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/magnet.png" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/magnet.png?cacheid=73b6bddf" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/search-icon.svg" }, @@ -276,8 +276,8 @@ TEST_F(ServerTest, CacheIdsOfStaticResources) const std::vector testData{ { /* url */ "/ROOT%23%3F/", -R"EXPECTEDRESULT( href="/ROOT%23%3F/skin/kiwix.css?cacheid=28889647" - href="/ROOT%23%3F/skin/index.css?cacheid=624104e6" +R"EXPECTEDRESULT( href="/ROOT%23%3F/skin/kiwix.css?cacheid=bdae4d22" + href="/ROOT%23%3F/skin/index.css?cacheid=081e1606" @@ -315,8 +315,8 @@ R"EXPECTEDRESULT( - +R"EXPECTEDRESULT( +