1 | @charset "utf-8"; // foreign characters ahead (in KSS markup)
|
2 |
|
3 | // Copyright 2015 Palantir Technologies, Inc. All rights reserved.
|
4 | // Licensed under the Apache License, Version 2.0.
|
5 |
|
6 | @import "common/variables";
|
7 | @import "common/mixins";
|
8 | @import "~@blueprintjs/icons/src/icons";
|
9 |
|
10 | /*
|
11 | Headings
|
12 |
|
13 | Markup:
|
14 | <div>
|
15 | <h1 class="@ns-heading">H1 heading</h1>
|
16 | <h2 class="@ns-heading">H2 heading</h2>
|
17 | <h3 class="@ns-heading">H3 heading</h3>
|
18 | <h4 class="@ns-heading">H4 heading</h4>
|
19 | <h5 class="@ns-heading">H5 heading</h5>
|
20 | <h6 class="@ns-heading">H6 heading</h6>
|
21 | </div>
|
22 |
|
23 | Styleguide headings
|
24 | */
|
25 |
|
26 | .#{$ns}-heading {
|
27 | @include heading-typography();
|
28 | margin: 0 0 $pt-grid-size;
|
29 | padding: 0;
|
30 | }
|
31 |
|
32 | // tag: (font-size, line-height)
|
33 | $headings: (
|
34 | "h1": (36px, 40px),
|
35 | "h2": (28px, 32px),
|
36 | "h3": (22px, 25px),
|
37 | "h4": (18px, 21px),
|
38 | "h5": (16px, 19px),
|
39 | "h6": (14px, 16px)
|
40 | ) !default;
|
41 |
|
42 | @each $tag, $props in $headings {
|
43 | %#{$tag} {
|
44 | font-size: nth($props, 1);
|
45 | line-height: nth($props, 2);
|
46 | }
|
47 |
|
48 | #{$tag}.#{$ns}-heading {
|
49 | @extend %#{$tag};
|
50 | }
|
51 | }
|
52 |
|
53 | /*
|
54 | UI text
|
55 |
|
56 | Markup:
|
57 | <div class="{{.modifier}}">
|
58 | More than a decade ago, we set out to create products that would transform
|
59 | the way organizations use their data. Today, our products are deployed at
|
60 | the most critical government, commercial, and non-profit institutions in
|
61 | the world to solve problems we hadn’t even dreamed of back then.
|
62 | </div>
|
63 |
|
64 | .#{$ns}-ui-text - Default Blueprint font styles, applied to the `<body>` tag and available as a class for nested resets.
|
65 | .#{$ns}-monospace-text - Use a monospace font (ideal for code).
|
66 | .#{$ns}-running-text - Increase line height ideal for longform text. See [Running text](#core/typography.running-text) below for additional features.
|
67 | .#{$ns}-text-large - Use a larger font size.
|
68 | .#{$ns}-text-small - Use a smaller font size.
|
69 | .#{$ns}-text-muted - Change text color to a gentler gray.
|
70 | .#{$ns}-text-disabled - Change text color to a transparent, faded gray.
|
71 | .#{$ns}-text-overflow-ellipsis - Truncate a single line of text with an ellipsis if it overflows its container.
|
72 |
|
73 | Styleguide ui-text
|
74 | */
|
75 |
|
76 | .#{$ns}-ui-text {
|
77 | @include base-typography();
|
78 | }
|
79 |
|
80 | .#{$ns}-monospace-text {
|
81 | @include monospace-typography();
|
82 | }
|
83 |
|
84 | // NOTE: .#{$ns}-text-large defined below after .#{$ns}-running-text
|
85 |
|
86 | .#{$ns}-text-muted {
|
87 | color: $pt-text-color-muted;
|
88 |
|
89 | .#{$ns}-dark & {
|
90 | color: $pt-dark-text-color-muted;
|
91 | }
|
92 | }
|
93 |
|
94 | .#{$ns}-text-disabled {
|
95 | color: $pt-text-color-disabled;
|
96 |
|
97 | .#{$ns}-dark & {
|
98 | color: $pt-dark-text-color-disabled;
|
99 | }
|
100 | }
|
101 |
|
102 | .#{$ns}-text-overflow-ellipsis {
|
103 | @include overflow-ellipsis();
|
104 | }
|
105 |
|
106 | /*
|
107 | Running text
|
108 |
|
109 | Markup:
|
110 | <div class="@ns-running-text {{.modifier}}">
|
111 | <p>
|
112 | We build products that make people better at their most important
|
113 | work — the kind of work you read about on the front page of the
|
114 | newspaper, not just the technology section.
|
115 | </p>
|
116 | <ul>
|
117 | <li>Item the <code>first</code>.</li>
|
118 | <li>Item the <strong>second</strong></code>.</li>
|
119 | <li>Item the <a href="#core/typography.running-text">third</a>.</li>
|
120 | </ul>
|
121 | <h3>Scale, Speed, Agility</h3>
|
122 | <p>
|
123 | A successful data transformation requires the whole organization — users, the IT shop, and
|
124 | leadership — to operate in lockstep. With Foundry, the enterprise comes together to
|
125 | transform the organization and turn data into a competitive advantage.
|
126 | </p>
|
127 | </div>
|
128 |
|
129 | .#{$ns}-text-large - Use larger font size.
|
130 |
|
131 | Styleguide running-text
|
132 | */
|
133 |
|
134 | .#{$ns}-running-text {
|
135 | @include running-typography();
|
136 |
|
137 | @each $tag, $props in $headings {
|
138 | #{$tag} {
|
139 | @extend %#{$tag};
|
140 | @include heading-typography();
|
141 | margin-bottom: $pt-grid-size * 2;
|
142 | margin-top: $pt-grid-size * 4;
|
143 | }
|
144 | }
|
145 |
|
146 | hr {
|
147 | border: none;
|
148 | border-bottom: 1px solid $pt-divider-black;
|
149 | margin: ($pt-grid-size * 2) 0;
|
150 |
|
151 | .#{$ns}-dark & {
|
152 | border-color: $pt-dark-divider-white;
|
153 | }
|
154 | }
|
155 |
|
156 | p {
|
157 | margin: 0 0 $pt-grid-size;
|
158 | padding: 0;
|
159 | }
|
160 |
|
161 | blockquote {
|
162 | @extend %blockquote;
|
163 | }
|
164 |
|
165 | code {
|
166 | @extend %code;
|
167 | }
|
168 |
|
169 | kbd {
|
170 | @extend %keyboard;
|
171 | }
|
172 |
|
173 | pre {
|
174 | @extend %code-block;
|
175 | }
|
176 |
|
177 | table {
|
178 | @extend %html-table;
|
179 | }
|
180 |
|
181 | ul,
|
182 | ol {
|
183 | @extend %list;
|
184 | }
|
185 | }
|
186 |
|
187 | // NOTE: these must be defined after .@ns-running-text in order to override font-size.
|
188 | .#{$ns}-text-large {
|
189 | font-size: $pt-font-size-large;
|
190 | // line-height comes from .@ns-(ui|running)-text
|
191 | }
|
192 |
|
193 | .#{$ns}-text-small {
|
194 | font-size: $pt-font-size-small;
|
195 | // line-height comes from .@ns-(ui|running)-text
|
196 | }
|
197 |
|
198 | /*
|
199 | Links
|
200 |
|
201 | Simply use an `<a href="">` tag as you normally would. No class is necessary for Blueprint styles.
|
202 | Links are underlined only when hovered.
|
203 |
|
204 | Putting an icon inside a link will cause it to inherit the link's text color.
|
205 |
|
206 | Styleguide typography.links
|
207 | */
|
208 |
|
209 | a {
|
210 | color: $pt-link-color;
|
211 | text-decoration: none;
|
212 |
|
213 | &:hover {
|
214 | color: $pt-link-color;
|
215 | cursor: pointer;
|
216 | text-decoration: underline;
|
217 | }
|
218 |
|
219 | #{$icon-classes} {
|
220 | color: inherit;
|
221 | }
|
222 |
|
223 | code,
|
224 | .#{$ns}-dark & code {
|
225 | color: inherit;
|
226 | }
|
227 |
|
228 | .#{$ns}-dark &,
|
229 | .#{$ns}-dark &:hover {
|
230 | color: $pt-dark-link-color;
|
231 |
|
232 | #{$icon-classes} {
|
233 | color: inherit;
|
234 | }
|
235 | }
|
236 | }
|
237 |
|
238 | /*
|
239 | Preformatted text
|
240 |
|
241 | Markup:
|
242 | <div>
|
243 | <p>Use the <code class="@ns-code"><code></code> tag for snippets of code.</p>
|
244 | <pre class="@ns-code-block">Use the <pre> tag for blocks of code.</pre>
|
245 | <pre class="@ns-code-block"><code>// code sample
|
246 | export function hasModifier(
|
247 | modifiers: ts.ModifiersArray,
|
248 | ...modifierKinds: ts.SyntaxKind[],
|
249 | ) {
|
250 | if (modifiers == null || modifierKinds == null) {
|
251 | return false;
|
252 | }
|
253 | return modifiers.some(m => modifierKinds.some(k => m.kind === k));
|
254 | }</code></pre>
|
255 | </div>
|
256 |
|
257 | Styleguide preformatted
|
258 | */
|
259 |
|
260 | %code {
|
261 | @include monospace-typography();
|
262 | background: $pt-code-background-color;
|
263 |
|
264 | border-radius: $pt-border-radius;
|
265 | box-shadow: inset border-shadow(0.2);
|
266 | color: $pt-code-text-color;
|
267 | font-size: smaller;
|
268 | padding: 2px 5px;
|
269 |
|
270 | .#{$ns}-dark & {
|
271 | background: $pt-dark-code-background-color;
|
272 | box-shadow: inset border-shadow(0.4);
|
273 | color: $pt-dark-code-text-color;
|
274 | }
|
275 |
|
276 | a > & {
|
277 | // <code> in links. markdown: [`code`](http://url)
|
278 | // $pt-link-color does not have good contrast with non-link <code>'s in light theme, so we use a brighter hue
|
279 | color: $pt-intent-primary;
|
280 |
|
281 | .#{$ns}-dark & {
|
282 | color: inherit;
|
283 | }
|
284 | }
|
285 | }
|
286 |
|
287 | %code-block {
|
288 | @include monospace-typography();
|
289 | background: $pt-code-background-color;
|
290 | border-radius: $pt-border-radius;
|
291 | box-shadow: inset 0 0 0 1px $pt-divider-black;
|
292 | color: $pt-text-color;
|
293 |
|
294 | display: block;
|
295 | font-size: $pt-font-size - 1px;
|
296 | line-height: 1.4;
|
297 | margin: $pt-grid-size 0;
|
298 | padding: ($pt-grid-size * 1.3) ($pt-grid-size * 1.5) ($pt-grid-size * 1.2);
|
299 | word-break: break-all;
|
300 | word-wrap: break-word;
|
301 |
|
302 | .#{$ns}-dark & {
|
303 | background: $pt-dark-code-background-color;
|
304 | box-shadow: inset 0 0 0 1px $pt-dark-divider-black;
|
305 | color: $pt-dark-text-color;
|
306 | }
|
307 |
|
308 | > code {
|
309 | background: none;
|
310 | box-shadow: none;
|
311 | color: inherit;
|
312 | font-size: inherit;
|
313 | padding: 0;
|
314 | }
|
315 | }
|
316 |
|
317 | .#{$ns}-code {
|
318 | @extend %code;
|
319 | }
|
320 |
|
321 | .#{$ns}-code-block {
|
322 | @extend %code-block;
|
323 | }
|
324 |
|
325 | %keyboard {
|
326 | align-items: center;
|
327 | background: $white;
|
328 | border-radius: $pt-border-radius;
|
329 | box-shadow: $pt-elevation-shadow-1;
|
330 | color: $pt-text-color-muted;
|
331 | display: inline-flex;
|
332 | font-family: inherit;
|
333 | font-size: $pt-font-size-small;
|
334 | height: $pt-button-height-small;
|
335 | justify-content: center;
|
336 | line-height: $pt-button-height-small;
|
337 | min-width: $pt-button-height-small;
|
338 | padding: $pt-border-radius ($pt-border-radius * 2);
|
339 | vertical-align: middle;
|
340 |
|
341 | #{$icon-classes} {
|
342 | margin-right: $pt-grid-size / 2;
|
343 | }
|
344 |
|
345 | .#{$ns}-dark & {
|
346 | background: $dark-gray5;
|
347 | box-shadow: $pt-dark-elevation-shadow-1;
|
348 | color: $pt-dark-text-color-muted;
|
349 | }
|
350 | }
|
351 |
|
352 | .#{$ns}-key {
|
353 | @extend %keyboard;
|
354 | }
|
355 |
|
356 | /*
|
357 | Block quotes
|
358 |
|
359 | Markup:
|
360 | <blockquote class="@ns-blockquote">
|
361 | Premium Aerotec is a key supplier for Airbus, producing 30 million parts per year,
|
362 | which is huge complexity. Skywise helps us manage all the production steps.
|
363 | It gives Airbus much better visibility into where the product is in the supply chain,
|
364 | and it lets us immediately see our weak points so we can react on the spot.
|
365 | </blockquote>
|
366 |
|
367 | Styleguide blockquote
|
368 | */
|
369 |
|
370 | %blockquote {
|
371 | border-left: solid 4px rgba($gray4, 0.5);
|
372 | margin: 0 0 $pt-grid-size;
|
373 | padding: 0 ($pt-grid-size * 2);
|
374 |
|
375 | .#{$ns}-dark & {
|
376 | border-color: rgba($gray2, 0.5);
|
377 | }
|
378 | }
|
379 |
|
380 | .#{$ns}-blockquote {
|
381 | @extend %blockquote;
|
382 | }
|
383 |
|
384 | /*
|
385 | Lists
|
386 |
|
387 | Markup:
|
388 | <ol class="{{.modifier}}">
|
389 | <li>Item the first</li>
|
390 | <li>Item the second</li>
|
391 | <li>
|
392 | Item the third
|
393 | <ul class="{{.modifier}}">
|
394 | <li>Item the fourth</li>
|
395 | <li>Item the fifth</li>
|
396 | </ul>
|
397 | </li>
|
398 | </ol>
|
399 |
|
400 | .#{$ns}-list - Add a little spacing between items for readability.
|
401 | .#{$ns}-list-unstyled - Remove all list styling (including indicators) so you can add your own.
|
402 |
|
403 | Styleguide lists
|
404 | */
|
405 |
|
406 | %list {
|
407 | margin: $pt-grid-size 0;
|
408 | padding-left: $pt-grid-size * 3;
|
409 |
|
410 | li:not(:last-child) {
|
411 | margin-bottom: $pt-grid-size / 2;
|
412 | }
|
413 |
|
414 | // nested lists
|
415 | ol,
|
416 | ul {
|
417 | margin-top: $pt-grid-size / 2;
|
418 | }
|
419 | }
|
420 |
|
421 | .#{$ns}-list {
|
422 | @extend %list;
|
423 | }
|
424 |
|
425 | .#{$ns}-list-unstyled {
|
426 | list-style: none;
|
427 | margin: 0;
|
428 | padding: 0;
|
429 |
|
430 | li {
|
431 | padding: 0;
|
432 | }
|
433 | }
|
434 |
|
435 | /*
|
436 | Right-to-left text
|
437 |
|
438 | Markup:
|
439 | <h5 class="@ns-heading">Arabic:</h5>
|
440 | <p class="@ns-rtl">
|
441 | لكل لأداء بمحاولة من. مدينة الواقعة يبق أي, وإعلان وقوعها، حول كل, حدى عجّل مشروط الخاسرة قد.
|
442 | من الذود تكبّد بين, و لها واحدة الأراضي. عل الصفحة والروسية يتم, أي للحكومة استعملت شيء. أم وصل زهاء اليا
|
443 | </p>
|
444 | <h5 class="@ns-heading">Hebrew:</h5>
|
445 | <p class="@ns-rtl">
|
446 | כדי על עזרה יידיש הבהרה, מלא באגים טכניים דת. תנך או ברית ביולי. כתב בה הטבע למנוע, דת כלים פיסיקה החופשית זכר.
|
447 | מתן החלל מאמרשיחהצפה ב. הספרות אנציקלופדיה אם זכר, על שימושי שימושיים תאולוגיה עזה
|
448 | </p>
|
449 |
|
450 | Styleguide rtl
|
451 | */
|
452 |
|
453 | .#{$ns}-rtl {
|
454 | text-align: right;
|
455 | }
|
456 |
|
457 | .#{$ns}-dark {
|
458 | color: $pt-dark-text-color;
|
459 | }
|