From 33412a6ab56423e21fec43c03b216244d6f31cc5 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 16 Dec 2020 22:16:21 +0100 Subject: [PATCH 1/2] Dropdown triangle fixes Fomantic's CSS assumes the dropdown triangles are fonts but we've recently swapped them for SVG so we need to wrestle a bit with Fomantic to get it to display properly and not cause buttons to resize. Fixes: https://github.com/go-gitea/gitea/issues/14014 --- web_src/less/_base.less | 19 +++++++++++++++++++ web_src/less/_review.less | 6 ------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 9f46e3ee7ba3d..10b09f5108eec 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -394,6 +394,25 @@ a.muted:hover, box-shadow: -1px -1px 0 0 var(--color-secondary); } +/* fix up SVG dropdown triangles because fomantic thinks they are icon fonts */ +.ui.dropdown > .dropdown.icon, +.btn-review > .dropdown.icon { + height: auto !important; + margin-left: .5rem !important; + margin-top: -1px !important; + margin-bottom: -1px !important; + margin-right: -.5rem !important; +} +.ui.button.dropdown > .dropdown.icon, +.btn-review > .dropdown.icon { + float: right !important; +} +.ui.selection.dropdown > .search.icon, +.ui.selection.dropdown > .delete.icon, +.ui.selection.dropdown > .dropdown.icon { + top: 0 !important; +} + .ui.cards > .card, .ui.card { background: var(--color-card); diff --git a/web_src/less/_review.less b/web_src/less/_review.less index 029c96fc5005c..2d0ac1b324d29 100644 --- a/web_src/less/_review.less +++ b/web_src/less/_review.less @@ -142,12 +142,6 @@ a.blob-excerpt:hover { color: #fff; } -.btn-review > .dropdown.icon { - float: right; - height: 12px !important; - margin-left: .5rem; -} - @media @mediaSm { #review-box > .menu { > .ui.segment { From e51d61a99ed9447290de0a06f6c2715565c8cc55 Mon Sep 17 00:00:00 2001 From: silverwind Date: Wed, 16 Dec 2020 22:51:21 +0100 Subject: [PATCH 2/2] move css and add link --- web_src/less/_base.less | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/web_src/less/_base.less b/web_src/less/_base.less index 10b09f5108eec..45cd549320d40 100644 --- a/web_src/less/_base.less +++ b/web_src/less/_base.less @@ -394,25 +394,6 @@ a.muted:hover, box-shadow: -1px -1px 0 0 var(--color-secondary); } -/* fix up SVG dropdown triangles because fomantic thinks they are icon fonts */ -.ui.dropdown > .dropdown.icon, -.btn-review > .dropdown.icon { - height: auto !important; - margin-left: .5rem !important; - margin-top: -1px !important; - margin-bottom: -1px !important; - margin-right: -.5rem !important; -} -.ui.button.dropdown > .dropdown.icon, -.btn-review > .dropdown.icon { - float: right !important; -} -.ui.selection.dropdown > .search.icon, -.ui.selection.dropdown > .delete.icon, -.ui.selection.dropdown > .dropdown.icon { - top: 0 !important; -} - .ui.cards > .card, .ui.card { background: var(--color-card); @@ -1753,6 +1734,26 @@ table th[data-sortt-desc] { } } +/* fix up SVG dropdown triangles because fomantic thinks they are icon fonts */ +/* see https://github.com/go-gitea/gitea/issues/14014 */ +.ui.dropdown > .dropdown.icon, +.btn-review > .dropdown.icon { + height: auto !important; + margin-left: .5rem !important; + margin-top: -1px !important; + margin-bottom: -1px !important; + margin-right: -.5rem !important; +} +.ui.button.dropdown > .dropdown.icon, +.btn-review > .dropdown.icon { + float: right !important; +} +.ui.selection.dropdown > .search.icon, +.ui.selection.dropdown > .delete.icon, +.ui.selection.dropdown > .dropdown.icon { + top: 0 !important; +} + /* limit width of all direct dropdown menu children */ /* https://github.com/go-gitea/gitea/pull/10835 */ .dropdown:not(.selection) > .menu:not(.review-box) > *:not(.header) {