Merge "move rcfilters scroll logic to better support mobile mode"
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / styles / mw.rcfilters.ui.FilterTagMultiselectWidget.less
1 @import 'mediawiki.mixins';
2 @import 'mediawiki.ui/variables';
3 @import 'mw.rcfilters.variables';
4
5 .mw-rcfilters-ui-filterTagMultiselectWidget {
6 max-width: none;
7
8 .oo-ui-tagMultiselectWidget-input input {
9 // Make sure this uses the interface direction, not the content direction
10 direction: ltr;
11 border-bottom-right-radius: 0;
12 height: 2.5em;
13 }
14
15 &.oo-ui-widget-enabled {
16 .oo-ui-tagMultiselectWidget-handle {
17 border: 1px solid @colorGray10;
18 border-bottom: 0;
19 background-color: @colorGray15;
20 border-radius: 2px 2px 0 0;
21 padding: 0 0.6em 0.6em 0.6em;
22 margin-top: 1em;
23 line-height: normal;
24 }
25
26 // Hamburger menu for dropdown.
27 .oo-ui-tagMultiselectWidget-input > .oo-ui-icon-menu {
28 cursor: pointer;
29 }
30 }
31
32 .mw-rcfilters-collapsed & {
33 // Taking from the handle, since border-bottom is set on the
34 // filters view which is hidden when collapsed
35 border-bottom: 1px solid @colorGray10;
36
37 &.mw-rcfilters-ui-filterTagMultiselectWidget.oo-ui-widget-enabled .oo-ui-tagMultiselectWidget-handle {
38 padding-bottom: 0;
39 padding-top: 0;
40 }
41
42 .mw-rcfilters-ui-filterTagMultiselectWidget-wrapper-hideshow {
43 border-left: 1px solid @colorGray10;
44 }
45
46 &.oo-ui-tagMultiselectWidget-outlined {
47 width: unset;
48 max-width: 100%;
49 }
50
51 // Hide inner elements
52 .mw-rcfilters-ui-filterTagMultiselectWidget-wrapper-filters,
53 .mw-rcfilters-ui-filterTagMultiselectWidget-views,
54 .mw-rcfilters-ui-filterTagMultiselectWidget-views-input {
55 display: none;
56 }
57 }
58
59 .oo-ui-tagMultiselectWidget.oo-ui-widget-enabled &-animate.oo-ui-tagMultiselectWidget-handle {
60 .transition( background-color 500ms ease-out );
61 }
62
63 .oo-ui-tagMultiselectWidget.oo-ui-widget-enabled &-emphasize.oo-ui-tagMultiselectWidget-handle {
64 background-color: @background-color-primary;
65 }
66
67 &-hideshowButton.oo-ui-buttonElement > .oo-ui-buttonElement-button {
68 // Override the OOUI default for buttons
69 font-weight: normal;
70 }
71
72 &-wrapper {
73 &-top {
74 display: flex;
75 flex-wrap: nowrap;
76 justify-content: space-between;
77
78 &-title {
79 padding: 0.6em 0; // Same top padding as the handle
80 flex: 0 0 auto;
81 }
82
83 &-queryName {
84 flex: 1 1 auto;
85 padding: 0.6em 0; // Same top padding as the handle
86 white-space: nowrap;
87 min-width: 0; // This has to be here to enable the text truncation
88 overflow: hidden;
89 text-overflow: ellipsis;
90 }
91
92 &-hideshow {
93 flex: 0 0 auto;
94 margin-left: 0.5em;
95 padding-left: 0.5em;
96 }
97 }
98
99 &-content {
100 &-title {
101 font-weight: bold;
102 color: @colorGray5;
103 white-space: nowrap;
104 }
105
106 &-savedQueryTitle {
107 color: @colorGray2;
108 padding-left: 1em;
109 font-weight: bold;
110 vertical-align: top;
111 overflow: hidden;
112 text-overflow: ellipsis;
113 white-space: nowrap;
114 // This is necessary for Firefox to be able to
115 // truncate the text. Without this rule, the label
116 // is treated as if it's full-width, and while it is
117 // being truncated with the overflow:hidden,
118 // the ellipses isn't showing properly.
119 // This rule seems to convince Firefox to re-render,
120 // fix the label's width properly, and add the ellipses
121 max-width: 100%;
122 }
123 }
124 }
125
126 &-views {
127 &-input {
128 width: 100%;
129 }
130
131 &-select {
132 &-widget.oo-ui-widget {
133 display: block;
134 .box-sizing( border-box );
135 height: 2.5em;
136 border: 1px solid @colorGray10;
137 border-left-width: 0;
138 border-radius: 0 0 @borderRadius 0;
139 // For `padding-right` using the 'left' value from
140 // .oo-ui-buttonElement-frameless.oo-ui-iconElement >
141 // .oo-ui-buttonElement-button > .oo-ui-iconElement-icon
142 padding-right: 0.35714286em;
143 text-align: right;
144 white-space: nowrap;
145
146 .oo-ui-buttonOptionWidget:first-child {
147 margin-left: 0;
148 }
149 }
150 }
151 }
152
153 &-emptyFilters {
154 color: @colorGray7;
155 }
156
157 &-cell-filters {
158 width: 100%;
159
160 div.oo-ui-tagMultiselectWidget-group {
161 margin-top: 0.2em;
162 display: block;
163 }
164 }
165
166 &-cell-reset {
167 text-align: right;
168 padding-left: 0.5em;
169 }
170 }