-
Notifications
You must be signed in to change notification settings - Fork 116
Expand file tree
/
Copy path_snapcraft_snap-details.scss
More file actions
154 lines (131 loc) · 3.82 KB
/
_snapcraft_snap-details.scss
File metadata and controls
154 lines (131 loc) · 3.82 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
@mixin snapcraft-snap-details {
$asciinema-background: #121314;
@media screen and (max-width: $breakpoint-small) {
.snapcraft-snap-details {
&__snippet {
margin-left: -4.5rem !important;
}
}
}
.p-snap-details__media {
// videos holder
.p-snap-details__media-items {
display: flex;
flex-direction: column;
justify-content: flex-start;
.p-carousel__item--screenshot {
display: flex;
flex-grow: 0;
height: auto;
margin-bottom: $spv--large;
max-height: 90px;
overflow: hidden;
}
&.is-small {
.p-carousel__item--screenshot {
max-height: 128px;
}
}
.p-carousel__item--screenshot img,
.p-carousel__item--screenshot video {
align-self: center;
width: 100%;
}
@media screen and (max-width: $breakpoint-large - 1) {
flex-direction: row;
flex-wrap: wrap;
margin-bottom: -$spv--large;
margin-right: -$sph--large;
margin-top: $spv--large;
.p-carousel__item--screenshot {
margin-bottom: $spv--large;
margin-right: $sph--large;
max-height: 100%;
max-width: 129px;
}
}
@media screen and (max-width: $breakpoint-x-small) {
.p-carousel__item--screenshot {
max-width: calc(50% - 1rem);
}
}
}
iframe {
margin-bottom: 0;
}
.asciicast {
margin: 0 auto !important;
position: relative;
&::before {
background: $asciinema-background;
bottom: 1.5rem;
content: " ";
display: block;
left: 0;
position: absolute;
right: 0;
top: 0;
}
iframe {
position: relative;
}
}
}
.snapcraft-details-preview {
[data-live="public_metrics_live"] {
position: relative;
&::after {
align-items: center;
bottom: 0;
content: "This content is being displayed for preview purposes";
display: flex;
justify-content: center;
left: 0;
position: absolute;
right: 0;
top: 0;
}
}
.snapcraft-territories,
.snapcraft-distro-chart {
opacity: 0.3;
}
}
.p-package-header {
container: pkgname / inline-size;
&__name {
// package name string length; 40 is the maximum length the store backend
// supports and this is just a default value, it should be overridden via inline styles on
// the element
--length: 40;
// font size/character width (1rem/1ch) ratio, a magic number
// measured in the browser
--fs-width-ratio: 1.77;
// we take the full width of the container (100cqw) and divide it by the number of
// characters in the package name (+2 to account for the parentheses): this is the horizontal
// space that each character will use on average; we multiply this by the font size/character
// width ratio to get the font size
--target-font-size: calc(
(100cqw / (2 + var(--length))) * var(--fs-width-ratio)
);
// we limit the actual font size value to the smallest and largest heading font sizes
--font-size: clamp(
var(--min-font-size),
var(--target-font-size),
var(--max-font-size)
);
--min-font-size: #{map-get($settings-text-h6-mobile, font-size)}rem;
--max-font-size: #{map-get($settings-text-h1-mobile, font-size)}rem;
@media (min-width: $breakpoint-heading-threshold) {
--min-font-size: #{map-get($settings-text-h6, font-size)}rem;
--max-font-size: #{map-get($settings-text-h1, font-size)}rem;
}
display: inline-block;
font-size: var(--font-size);
white-space: nowrap;
.p-tooltip__message {
font-weight: 400;
}
}
}
}