From cd83e8bce69cc34fb885fd52cb366a14255b6263 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 17 Mar 2024 04:21:14 +0100 Subject: [PATCH] Remove fomantic message module (#29856) Remove this CSS-only module, which gives a nice reduction in CSS size. Should look exactly like before. (cherry picked from commit 4e547822f348c2963e0db33135b45d43dfc58df8) --- web_src/css/base.css | 67 --- web_src/css/index.css | 1 + web_src/css/modules/message.css | 99 ++++ web_src/fomantic/build/semantic.css | 684 ---------------------------- 4 files changed, 100 insertions(+), 751 deletions(-) create mode 100644 web_src/css/modules/message.css diff --git a/web_src/css/base.css b/web_src/css/base.css index 07b62c390..b4beb41dc 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -511,73 +511,6 @@ ol.ui.list li, visibility: visible !important; } -.ui.message { - background: var(--color-box-body); - color: var(--color-text); - box-shadow: none !important; - border: 1px solid var(--color-secondary); -} - -.ui.info.message .header, -.ui.blue.message .header { - color: var(--color-blue); -} - -.ui.info.message, -.ui.attached.info.message, -.ui.blue.message, -.ui.attached.blue.message { - background: var(--color-info-bg); - color: var(--color-info-text); - border-color: var(--color-info-border); -} - -.ui.success.message .header, -.ui.positive.message .header, -.ui.green.message .header { - color: var(--color-green); -} - -.ui.success.message, -.ui.attached.success.message, -.ui.positive.message, -.ui.attached.positive.message { - background: var(--color-success-bg); - color: var(--color-success-text); - border-color: var(--color-success-border); -} - -.ui.error.message .header, -.ui.negative.message .header, -.ui.red.message .header { - color: var(--color-red); -} - -.ui.error.message, -.ui.attached.error.message, -.ui.red.message, -.ui.attached.red.message, -.ui.negative.message, -.ui.attached.negative.message { - background: var(--color-error-bg); - color: var(--color-error-text); - border-color: var(--color-error-border); -} - -.ui.warning.message .header, -.ui.yellow.message .header { - color: var(--color-yellow); -} - -.ui.warning.message, -.ui.attached.warning.message, -.ui.yellow.message, -.ui.attached.yellow.message { - background: var(--color-warning-bg); - color: var(--color-warning-text); - border-color: var(--color-warning-border); -} - .ui.error.header { background: var(--color-error-bg) !important; color: var(--color-error-text) !important; diff --git a/web_src/css/index.css b/web_src/css/index.css index ab925a4aa..f6e4c196e 100644 --- a/web_src/css/index.css +++ b/web_src/css/index.css @@ -12,6 +12,7 @@ @import "./modules/divider.css"; @import "./modules/svg.css"; @import "./modules/flexcontainer.css"; +@import "./modules/message.css"; @import "./shared/flex-list.css"; @import "./shared/milestone.css"; diff --git a/web_src/css/modules/message.css b/web_src/css/modules/message.css new file mode 100644 index 000000000..22dd03232 --- /dev/null +++ b/web_src/css/modules/message.css @@ -0,0 +1,99 @@ +.ui.message { + background: var(--color-box-body); + color: var(--color-text); + border: 1px solid var(--color-secondary); + position: relative; + min-height: 1em; + margin: 1em 0; + padding: 1em 1.5em; + border-radius: var(--border-radius); +} + +.ui.message:first-child { + margin-top: 0; +} + +.ui.message:last-child { + margin-bottom: 0; +} + +.ui.attached.message { + margin-bottom: -1px; + border-radius: var(--border-radius) var(--border-radius) 0 0; + margin-left: -1px; + margin-right: -1px; +} + +.ui.attached + .ui.attached.message:not(.top):not(.bottom) { + margin-top: -1px; + border-radius: 0; +} + +.ui.bottom.attached.message { + margin-top: -1px; + border-radius: 0 0 var(--border-radius) var(--border-radius); +} + +.ui.bottom.attached.message:not(:last-child) { + margin-bottom: 1em; +} + +.ui.info.message .header, +.ui.blue.message .header { + color: var(--color-blue); +} + +.ui.info.message, +.ui.attached.info.message, +.ui.blue.message, +.ui.attached.blue.message { + background: var(--color-info-bg); + color: var(--color-info-text); + border-color: var(--color-info-border); +} + +.ui.success.message .header, +.ui.positive.message .header, +.ui.green.message .header { + color: var(--color-green); +} + +.ui.success.message, +.ui.attached.success.message, +.ui.positive.message, +.ui.attached.positive.message { + background: var(--color-success-bg); + color: var(--color-success-text); + border-color: var(--color-success-border); +} + +.ui.error.message .header, +.ui.negative.message .header, +.ui.red.message .header { + color: var(--color-red); +} + +.ui.error.message, +.ui.attached.error.message, +.ui.red.message, +.ui.attached.red.message, +.ui.negative.message, +.ui.attached.negative.message { + background: var(--color-error-bg); + color: var(--color-error-text); + border-color: var(--color-error-border); +} + +.ui.warning.message .header, +.ui.yellow.message .header { + color: var(--color-yellow); +} + +.ui.warning.message, +.ui.attached.warning.message, +.ui.yellow.message, +.ui.attached.yellow.message { + background: var(--color-warning-bg); + color: var(--color-warning-text); + border-color: var(--color-warning-border); +} diff --git a/web_src/fomantic/build/semantic.css b/web_src/fomantic/build/semantic.css index 476f7ebf1..6f45c1944 100644 --- a/web_src/fomantic/build/semantic.css +++ b/web_src/fomantic/build/semantic.css @@ -14926,690 +14926,6 @@ Floated Menu / Item /******************************* Site Overrides *******************************/ -/*! - * # Fomantic-UI - Message - * http://github.com/fomantic/Fomantic-UI/ - * - * - * Released under the MIT license - * http://opensource.org/licenses/MIT - * - */ - -/******************************* - Message -*******************************/ - -.ui.message { - position: relative; - min-height: 1em; - margin: 1em 0; - background: #F8F8F9; - padding: 1em 1.5em; - line-height: 1.4285em; - color: rgba(0, 0, 0, 0.87); - transition: opacity 0.1s ease, color 0.1s ease, background 0.1s ease, box-shadow 0.1s ease; - border-radius: 0.28571429rem; - box-shadow: 0 0 0 1px rgba(34, 36, 38, 0.22) inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.message:first-child { - margin-top: 0; -} - -.ui.message:last-child { - margin-bottom: 0; -} - -/*-------------- - Content ----------------*/ - -/* Header */ - -.ui.message .header { - display: block; - font-family: var(--fonts-regular); - font-weight: 500; - margin: -0.14285714em 0 0 0; -} - -/* Default font size */ - -.ui.message .header:not(.ui) { - font-size: 1.14285714em; -} - -/* Paragraph */ - -.ui.message p { - opacity: 0.85; - margin: 0.75em 0; -} - -.ui.message p:first-child { - margin-top: 0; -} - -.ui.message p:last-child { - margin-bottom: 0; -} - -.ui.message .header + p { - margin-top: 0.25em; -} - -/* List */ - -.ui.message .list:not(.ui) { - text-align: left; - padding: 0; - opacity: 0.85; - list-style-position: inside; - margin: 0.5em 0 0; -} - -.ui.message .list:not(.ui):first-child { - margin-top: 0; -} - -.ui.message .list:not(.ui):last-child { - margin-bottom: 0; -} - -.ui.message .list:not(.ui) li { - position: relative; - list-style-type: none; - margin: 0 0 0.3em 1em; - padding: 0; -} - -.ui.message .list:not(.ui) li:before { - position: absolute; - content: '•'; - left: -1em; - height: 100%; - vertical-align: baseline; -} - -.ui.message .list:not(.ui) li:last-child { - margin-bottom: 0; -} - -/* Icon */ - -.ui.message > i.icon { - margin-right: 0.6em; -} - -/* Close Icon */ - -.ui.message > .close.icon { - cursor: pointer; - position: absolute; - margin: 0; - top: 0.78575em; - right: 0.5em; - opacity: 0.7; - transition: opacity 0.1s ease; -} - -.ui.message > .close.icon:hover { - opacity: 1; -} - -/* First / Last Element */ - -.ui.message > :first-child { - margin-top: 0; -} - -.ui.message > :last-child { - margin-bottom: 0; -} - -/******************************* - Coupling -*******************************/ - -.ui.dropdown .menu > .message { - margin: 0 -1px; -} - -/******************************* - States -*******************************/ - -/*-------------- - Visible ----------------*/ - -.ui.visible.visible.visible.visible.message { - display: block; -} - -.ui.icon.visible.visible.visible.visible.message { - display: flex; -} - -/*-------------- - Hidden ----------------*/ - -.ui.hidden.hidden.hidden.hidden.message { - display: none; -} - -/******************************* - Variations -*******************************/ - -/*-------------- - Compact - ---------------*/ - -.ui.compact.message { - display: inline-block; -} - -.ui.compact.icon.message { - display: inline-flex; - width: auto; -} - -/*-------------- - Attached - ---------------*/ - -.ui.attached.message { - margin-bottom: -1px; - border-radius: 0.28571429rem 0.28571429rem 0 0; - box-shadow: 0 0 0 1px rgba(34, 36, 38, 0.15) inset; - margin-left: -1px; - margin-right: -1px; -} - -.ui.attached + .ui.attached.message:not(.top):not(.bottom) { - margin-top: -1px; - border-radius: 0; -} - -.ui.bottom.attached.message { - margin-top: -1px; - border-radius: 0 0 0.28571429rem 0.28571429rem; - box-shadow: 0 0 0 1px rgba(34, 36, 38, 0.15) inset, 0 1px 2px 0 rgba(34, 36, 38, 0.15); -} - -.ui.bottom.attached.message:not(:last-child) { - margin-bottom: 1em; -} - -.ui.attached.icon.message { - width: auto; -} - -/*-------------- - Icon - ---------------*/ - -.ui.icon.message { - display: flex; - width: 100%; - align-items: center; -} - -.ui.icon.message > i.icon:not(.close) { - display: block; - flex: 0 0 auto; - width: auto; - line-height: 1; - vertical-align: middle; - font-size: 3em; - opacity: 0.8; -} - -.ui.icon.message > .content { - display: block; - flex: 1 1 auto; - vertical-align: middle; -} - -.ui.icon.message > i.icon:not(.close) + .content { - padding-left: 0; -} - -.ui.icon.message > i.circular.icon { - width: 1em; -} - -/*-------------- - Floating - ---------------*/ - -.ui.floating.message { - box-shadow: 0 0 0 1px rgba(34, 36, 38, 0.22) inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -/*-------------- - Colors ----------------*/ - -/*-------------- - Types ----------------*/ - -.ui.positive.message { - background-color: #FCFFF5; - color: #2C662D; -} - -.ui.positive.message, -.ui.attached.positive.message { - box-shadow: 0 0 0 1px #A3C293 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.positive.message { - box-shadow: 0 0 0 1px #A3C293 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.positive.message .header { - color: #1A531B; -} - -.ui.negative.message { - background-color: #FFF6F6; - color: #9F3A38; -} - -.ui.negative.message, -.ui.attached.negative.message { - box-shadow: 0 0 0 1px #E0B4B4 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.negative.message { - box-shadow: 0 0 0 1px #E0B4B4 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.negative.message .header { - color: #912D2B; -} - -.ui.info.message { - background-color: #F8FFFF; - color: #276F86; -} - -.ui.info.message, -.ui.attached.info.message { - box-shadow: 0 0 0 1px #A9D5DE inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.info.message { - box-shadow: 0 0 0 1px #A9D5DE inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.info.message .header { - color: #0E566C; -} - -.ui.warning.message { - background-color: #FFFAF3; - color: #573A08; -} - -.ui.warning.message, -.ui.attached.warning.message { - box-shadow: 0 0 0 1px #C9BA9B inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.warning.message { - box-shadow: 0 0 0 1px #C9BA9B inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.warning.message .header { - color: #794B02; -} - -.ui.error.message { - background-color: #FFF6F6; - color: #9F3A38; -} - -.ui.error.message, -.ui.attached.error.message { - box-shadow: 0 0 0 1px #E0B4B4 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.error.message { - box-shadow: 0 0 0 1px #E0B4B4 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.error.message .header { - color: #912D2B; -} - -.ui.success.message { - background-color: #FCFFF5; - color: #2C662D; -} - -.ui.success.message, -.ui.attached.success.message { - box-shadow: 0 0 0 1px #A3C293 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.success.message { - box-shadow: 0 0 0 1px #A3C293 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.success.message .header { - color: #1A531B; -} - -.ui.primary.message { - background-color: #DFF0FF; - color: rgba(255, 255, 255, 0.9); -} - -.ui.primary.message, -.ui.attached.primary.message { - box-shadow: 0 0 0 1px #2185D0 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.primary.message { - box-shadow: 0 0 0 1px #2185D0 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.primary.message .header { - color: rgba(242, 242, 242, 0.9); -} - -.ui.secondary.message { - background-color: #F4F4F4; - color: rgba(255, 255, 255, 0.9); -} - -.ui.secondary.message, -.ui.attached.secondary.message { - box-shadow: 0 0 0 1px #1B1C1D inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.secondary.message { - box-shadow: 0 0 0 1px #1B1C1D inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.secondary.message .header { - color: rgba(242, 242, 242, 0.9); -} - -.ui.red.message { - background-color: #FFE8E6; - color: #DB2828; -} - -.ui.red.message, -.ui.attached.red.message { - box-shadow: 0 0 0 1px #DB2828 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.red.message { - box-shadow: 0 0 0 1px #DB2828 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.red.message .header { - color: #c82121; -} - -.ui.orange.message { - background-color: #FFEDDE; - color: #F2711C; -} - -.ui.orange.message, -.ui.attached.orange.message { - box-shadow: 0 0 0 1px #F2711C inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.orange.message { - box-shadow: 0 0 0 1px #F2711C inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.orange.message .header { - color: #e7640d; -} - -.ui.yellow.message { - background-color: #FFF8DB; - color: #B58105; -} - -.ui.yellow.message, -.ui.attached.yellow.message { - box-shadow: 0 0 0 1px #B58105 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.yellow.message { - box-shadow: 0 0 0 1px #B58105 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.yellow.message .header { - color: #9c6f04; -} - -.ui.olive.message { - background-color: #FBFDEF; - color: #8ABC1E; -} - -.ui.olive.message, -.ui.attached.olive.message { - box-shadow: 0 0 0 1px #8ABC1E inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.olive.message { - box-shadow: 0 0 0 1px #8ABC1E inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.olive.message .header { - color: #7aa61a; -} - -.ui.green.message { - background-color: #E5F9E7; - color: #1EBC30; -} - -.ui.green.message, -.ui.attached.green.message { - box-shadow: 0 0 0 1px #1EBC30 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.green.message { - box-shadow: 0 0 0 1px #1EBC30 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.green.message .header { - color: #1aa62a; -} - -.ui.teal.message { - background-color: #E1F7F7; - color: #10A3A3; -} - -.ui.teal.message, -.ui.attached.teal.message { - box-shadow: 0 0 0 1px #10A3A3 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.teal.message { - box-shadow: 0 0 0 1px #10A3A3 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.teal.message .header { - color: #0e8c8c; -} - -.ui.blue.message { - background-color: #DFF0FF; - color: #2185D0; -} - -.ui.blue.message, -.ui.attached.blue.message { - box-shadow: 0 0 0 1px #2185D0 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.blue.message { - box-shadow: 0 0 0 1px #2185D0 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.blue.message .header { - color: #1e77ba; -} - -.ui.violet.message { - background-color: #EAE7FF; - color: #6435C9; -} - -.ui.violet.message, -.ui.attached.violet.message { - box-shadow: 0 0 0 1px #6435C9 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.violet.message { - box-shadow: 0 0 0 1px #6435C9 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.violet.message .header { - color: #5a30b5; -} - -.ui.purple.message { - background-color: #F6E7FF; - color: #A333C8; -} - -.ui.purple.message, -.ui.attached.purple.message { - box-shadow: 0 0 0 1px #A333C8 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.purple.message { - box-shadow: 0 0 0 1px #A333C8 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.purple.message .header { - color: #922eb4; -} - -.ui.pink.message { - background-color: #FFE3FB; - color: #E03997; -} - -.ui.pink.message, -.ui.attached.pink.message { - box-shadow: 0 0 0 1px #E03997 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.pink.message { - box-shadow: 0 0 0 1px #E03997 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.pink.message .header { - color: #dd238b; -} - -.ui.brown.message { - background-color: #F1E2D3; - color: #A5673F; -} - -.ui.brown.message, -.ui.attached.brown.message { - box-shadow: 0 0 0 1px #A5673F inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.brown.message { - box-shadow: 0 0 0 1px #A5673F inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.brown.message .header { - color: #935b38; -} - -.ui.grey.message { - background-color: #F4F4F4; - color: #767676; -} - -.ui.grey.message, -.ui.attached.grey.message { - box-shadow: 0 0 0 1px #767676 inset, 0 0 0 0 rgba(0, 0, 0, 0); -} - -.ui.floating.grey.message { - box-shadow: 0 0 0 1px #767676 inset, 0 2px 4px 0 rgba(34, 36, 38, 0.12), 0 2px 10px 0 rgba(34, 36, 38, 0.15); -} - -.ui.grey.message .header { - color: #696969; -} - -.ui.black.message { - background-color: #1B1C1D; - color: rgba(255, 255, 255, 0.9); -} - -.ui.black.message .header { - color: rgba(255, 255, 255, 0.9); -} - -/*-------------- - Sizes ----------------*/ - -.ui.message { - font-size: 1em; -} - -.ui.mini.message { - font-size: 0.78571429em; -} - -.ui.tiny.message { - font-size: 0.85714286em; -} - -.ui.small.message { - font-size: 0.92857143em; -} - -.ui.large.message { - font-size: 1.14285714em; -} - -.ui.big.message { - font-size: 1.28571429em; -} - -.ui.huge.message { - font-size: 1.42857143em; -} - -.ui.massive.message { - font-size: 1.71428571em; -} - -/******************************* - Theme Overrides -*******************************/ - -/******************************* - Site Overrides -*******************************/ /*! * # Fomantic-UI - Modal * http://github.com/fomantic/Fomantic-UI/