/
_banner.scss
66 lines (52 loc) · 1.37 KB
/
_banner.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Copyright 2017 Palantir Technologies, Inc. All rights reserved.
// Licensed under the terms of the LICENSE file distributed with this project.
@import "~@blueprintjs/core/src/common/variables";
@import "~@blueprintjs/core/src/components/button/common";
$banner-height: $pt-grid-size * 4;
// banner along top of screen linking to v2 docs
.docs-banner {
flex: 0 0 auto;
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: $pt-z-index-overlay - 1;
box-shadow: inset 0 -1px 0 $pt-divider-black;
height: $banner-height;
text-align: center;
line-height: $banner-height;
// stylelint-disable declaration-no-important
color: $white !important;
@each $intent, $colors in $button-intents {
&.pt-intent-#{$intent} {
background: nth($colors, 1);
&:hover {
background: nth($colors, 2);
}
&:active {
background: nth($colors, 3);
}
}
}
&:hover {
text-decoration: none;
}
.pt-dark & {
box-shadow: 0 1px 0 $pt-divider-black;
}
}
// shift entire page down by $banner-height pixels, when banner is present
.docs-banner + .docs-root {
.docs-anchor {
margin-top: -$pt-navbar-height - $content-padding - $banner-height;
}
.docs-app {
padding-top: $pt-navbar-height + $banner-height;
}
.docs-navbar {
top: $banner-height;
}
.docs-nav {
top: $pt-navbar-height + $banner-height;
}
}