Skip to content

Commit 6e06012

Browse files
committed
1 parent c8972e1 commit 6e06012

File tree

1 file changed

+181
-0
lines changed

1 file changed

+181
-0
lines changed

common/gtk-3.0/3.24/sass/_libhandy.scss

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,184 @@ window.csd.unified:not(.solid-csd):not(.fullscreen):not(.tiled):not(.tiled-top):
236236
margin: 0;
237237
}
238238
}
239+
240+
// Tabs
241+
242+
@mixin undershoot-gradient($dir) {
243+
background: linear-gradient(to #{$dir},
244+
$bg_color,
245+
transparentize($bg_color, 1) 20px);
246+
}
247+
248+
@mixin need-attention-gradient($dir) {
249+
background: linear-gradient(to #{$dir},
250+
transparentize($selected_bg_color, .3),
251+
transparentize($selected_bg_color, .5) 1px,
252+
transparentize($selected_bg_color, 1) 20px);
253+
}
254+
255+
tabbar {
256+
.box {
257+
min-height: 20px;
258+
background: $bg_color;
259+
border-bottom: 1px solid $borders_color;
260+
}
261+
262+
scrolledwindow.pinned {
263+
undershoot {
264+
border: 0 solid $borders_color;
265+
}
266+
267+
&:dir(rtl) undershoot.left {
268+
border-left-width: 1px;
269+
}
270+
271+
&:dir(ltr) undershoot.right {
272+
border-right-width: 1px;
273+
}
274+
275+
tabbox {
276+
&:dir(ltr) {
277+
padding-right: 1px;
278+
box-shadow: inset -1px 0 $borders_color;
279+
}
280+
281+
&:dir(rtl) {
282+
padding-left: 1px;
283+
box-shadow: inset 1px 0 $borders_color;
284+
}
285+
}
286+
}
287+
288+
undershoot {
289+
transition: none;
290+
291+
&.left {
292+
@include undershoot-gradient("right");
293+
}
294+
295+
&.right {
296+
@include undershoot-gradient("left");
297+
}
298+
}
299+
300+
.needs-attention-left undershoot.left {
301+
@include need-attention-gradient("right");
302+
}
303+
304+
.needs-attention-right undershoot.right {
305+
@include need-attention-gradient("left");
306+
}
307+
308+
tab {
309+
min-width: 118px;
310+
border-style: solid;
311+
border-color: $borders_color;
312+
border-width: 0 1px 0 1px;
313+
transition: background 150ms ease-in-out;
314+
background-color: transparentize($base_color, 1);
315+
color: $insensitive_fg_color;
316+
317+
&.pinned {
318+
min-width: 28px;
319+
}
320+
321+
&:checked, &:checked:hover {
322+
background-color: $base_color;
323+
color: $fg_color;
324+
}
325+
326+
&:hover {
327+
background-color: transparentize($base_color, 0.5);
328+
color: mix($fg_color, $insensitive_fg_color, 50%);
329+
}
330+
}
331+
332+
.start-action,
333+
.end-action {
334+
background-color: transparentize($base_color, 1);
335+
border-color: $borders_color;
336+
border-style: solid;
337+
transition: background 150ms ease-in-out;
338+
339+
button {
340+
border: none;
341+
border-radius: 0;
342+
}
343+
}
344+
345+
.start-action:dir(ltr),
346+
.end-action:dir(rtl) {
347+
border-right-width: 1px;
348+
349+
> * {
350+
margin-right: 1px;
351+
}
352+
}
353+
354+
.start-action:dir(rtl),
355+
.end-action:dir(ltr) {
356+
border-left-width: 1px;
357+
358+
> * {
359+
margin-left: 1px;
360+
}
361+
}
362+
}
363+
364+
.tab-drag-icon {
365+
tab {
366+
min-height: 20px;
367+
background-color: $base_color;
368+
369+
$_wm_border: if($variant!='dark', transparentize(black, 0.9), transparentize(black, 0.45));
370+
371+
// copy shadow and border color from popovers
372+
box-shadow: 0 2px 6px 1px if($variant!='dark', transparentize(black, 0.93), transparentize(black, 0.65)),
373+
0 0 0 1px darken($borders_color, 5%);
374+
375+
margin: 25px;
376+
}
377+
}
378+
379+
380+
tabbar,
381+
.tab-drag-icon {
382+
tab {
383+
padding: 2px 6px;
384+
385+
&.needs-attention {
386+
background-image:
387+
radial-gradient(ellipse at bottom,
388+
transparentize(white, .2),
389+
transparentize($selected_bg_color, .8) 15%,
390+
transparentize($selected_bg_color, 1) 15%);
391+
}
392+
393+
.tab-close-button,
394+
.tab-indicator {
395+
padding: 0;
396+
margin: 0;
397+
min-width: 22px;
398+
min-height: 22px;
399+
color: mix($bg_color, $fg_color, 35%);
400+
401+
border: none;
402+
box-shadow: none;
403+
-gtk-icon-shadow: none;
404+
text-shadow: none;
405+
background: none;
406+
}
407+
408+
.tab-close-button,
409+
.tab-indicator.clickable {
410+
&:hover {
411+
color: lighten(red, 15%);
412+
}
413+
414+
&:active {
415+
color: $selected_bg_color;
416+
}
417+
}
418+
}
419+
}

0 commit comments

Comments
 (0)