From b69c30ba27ac4b5dd9b255954d90312f6b0d4f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=CC=81bor=20Hojtsy?= <gabor@hojtsy.hu> Date: Tue, 14 May 2019 15:30:51 +0200 Subject: [PATCH] Issue #3045148 by huzooka, amateescu: Workspaces toolbar tab sizing is odd on really small viewport width (below 16.5em) and RTL styles are incomplete --- .../workspaces/css/workspaces.toolbar.css | 50 +++++++++++++++---- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/core/modules/workspaces/css/workspaces.toolbar.css b/core/modules/workspaces/css/workspaces.toolbar.css index 8cb501809eaa..1a6d7d2a932e 100644 --- a/core/modules/workspaces/css/workspaces.toolbar.css +++ b/core/modules/workspaces/css/workspaces.toolbar.css @@ -16,19 +16,40 @@ /* Tab appearance. */ .toolbar .toolbar-bar .workspaces-toolbar-tab { - float: right; /* LTR */ background-color: #e09600; -} -[dir="rtl"] .toolbar .toolbar-bar .workspaces-toolbar-tab { - float: left; + color: #000; } .toolbar .toolbar-bar .workspaces-toolbar-tab--is-default { background-color: #81c071; } +.toolbar-oriented .toolbar-bar .workspaces-toolbar-tab { + float: right; /* LTR */ +} +[dir="rtl"] .toolbar-oriented .toolbar-bar .workspaces-toolbar-tab { + float: left; +} + +@media (min-width: 16.5em) { + .toolbar:not(.toolbar-oriented) .toolbar-bar .workspaces-toolbar-tab { + float: right; + } + [dir="rtl"] .toolbar:not(.toolbar-oriented) .toolbar-bar .workspaces-toolbar-tab { + float: left; + } +} .toolbar .toolbar-bar .workspaces-toolbar-tab .toolbar-item { + width: 100%; margin: 0; - color: #000; + color: inherit; + text-align: left; +} +[dir="rtl"] .toolbar .toolbar-bar .workspaces-toolbar-tab .toolbar-item { + text-align: right; +} +.toolbar-oriented .toolbar-bar .workspaces-toolbar-tab .toolbar-item { + width: auto; + text-align: initial; } .toolbar .toolbar-icon-workspace:before { @@ -184,22 +205,33 @@ } @media all and (max-width: 766px) { - .toolbar .toolbar-bar .workspaces-toolbar-tab .toolbar-icon-workspace { - overflow: hidden; + .toolbar-oriented .toolbar-bar .workspaces-toolbar-tab .toolbar-icon-workspace { width: auto; max-width: 8em; + } + + .toolbar .toolbar-bar .workspaces-toolbar-tab .toolbar-icon-workspace { + overflow: hidden; padding-right: 1.3333em; - padding-left: 2.75em; + padding-left: 2.75em; /* LTR */ white-space: nowrap; text-indent: 0; text-overflow: ellipsis; } + [dir=rtl] .toolbar .toolbar-bar .workspaces-toolbar-tab .toolbar-icon-workspace { + padding-right: 2.75em; + padding-left: 1.3333em; + } .toolbar .toolbar-bar .workspaces-toolbar-tab .toolbar-icon-workspace:before { - left: 0.6667em; + left: 0.6667em; /* LTR */ width: 20px; background-size: 100% auto; } + [dir=rtl] .toolbar .toolbar-bar .workspaces-toolbar-tab .toolbar-icon-workspace:before { + right: 0.6667em; + left: auto; + } } @media all and (min-width: 767px) { -- GitLab