@transferwise/neptune-css 14.19.0 → 14.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,1338 +0,0 @@
1
- @import (reference) '../variables/neptune-tokens.less';
2
- @import (reference) './mixins/_logical-properties.less';
3
- @import (reference) './mixins/_nav-vertical-align.less';
4
- @import (reference) 'navbar.less';
5
-
6
- // stylelint-disable
7
-
8
- //
9
- // Navbars
10
- // --------------------------------------------------
11
-
12
- // Wrapper and base class
13
- //
14
- // Provide a static navbar from which we expand to create full-width, fixed, and
15
- // other navbar variations.
16
-
17
- .navbar {
18
- position: relative;
19
- font-size: var(--font-size-14);
20
- min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
21
- margin-bottom: @navbar-margin-bottom;
22
- border: 0 solid transparent;
23
- transition: border-top-width 0s linear;
24
-
25
- // Prevent floats from breaking the navbar
26
-
27
- &:extend(.clearfix all);
28
-
29
- @media (--screen-md) {
30
- border-radius: @navbar-border-radius;
31
-
32
- .container,
33
- .container-fluid {
34
- border: 0 solid transparent;
35
- }
36
- }
37
- }
38
-
39
- // Navbar heading
40
- //
41
- // Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
42
- // styling of responsive aspects.
43
- .navbar-header {
44
- &:extend(.clearfix all);
45
-
46
- @media (--screen-md) {
47
- .float(left);
48
- }
49
- }
50
-
51
- // Navbar collapse (body)
52
- //
53
- // Group your navbar content into this for easy collapsing and expanding across
54
- // various device sizes. By default, this content is collapsed when <768px, but
55
- // will expand past that for a horizontal display.
56
- //
57
- // To start (on mobile devices) the navbar links, forms, and buttons are stacked
58
- // vertically and include a `max-height` to overflow in case you have too much
59
- // content for the user's viewport.
60
-
61
- .navbar-collapse {
62
- overflow-x: visible;
63
- &:extend(.clearfix all);
64
-
65
- -webkit-overflow-scrolling: touch;
66
-
67
- @media (--screen-md) {
68
- width: auto;
69
- border-top: 0;
70
- box-shadow: none;
71
-
72
- &.collapse {
73
- display: block !important;
74
- padding-bottom: 0; // Override default setting
75
- }
76
-
77
- // Undo the collapse side padding for navbars with containers to ensure
78
- // alignment of right-aligned contents.
79
-
80
- .navbar.affix &,
81
- .navbar-fixed-top &,
82
- .navbar-static-top &,
83
- .navbar-fixed-bottom & {
84
- padding-left: 0;
85
- padding-right: 0;
86
- }
87
- }
88
- }
89
-
90
- // Both navbar header and collapse
91
- //
92
- // When a container is present, change the behavior of the header and collapse.
93
-
94
- .container,
95
- .container-fluid {
96
-
97
- > .navbar-header,
98
- > .navbar-collapse {
99
-
100
- @media (--screen-md) {
101
- margin-right: 0;
102
- margin-left: 0;
103
- }
104
- }
105
- }
106
-
107
- //
108
- // Navbar alignment options
109
- //
110
- // Display the navbar across the entirety of the page or fixed it to the top or
111
- // bottom of the page.
112
-
113
- // Static top (unfixed, but 100% wide) navbar
114
-
115
- .navbar-static-top {
116
- z-index: @zindex-navbar;
117
- margin-bottom: 0;
118
-
119
- @media (--screen-md) {
120
- border-radius: 0;
121
-
122
- .container,
123
- .container-fluid {
124
- border-width: 0;
125
- margin-bottom: -1px;
126
- }
127
- }
128
- }
129
-
130
- // Fix the top/bottom navbars when screen real estate supports it
131
-
132
- .navbar.affix,
133
- .navbar-fixed-top,
134
- .navbar-fixed-bottom {
135
- position: fixed;
136
- right:0;
137
- left:0;
138
- z-index: @zindex-navbar-fixed;
139
- backface-visibility: hidden;
140
- background-color: @color-navy-background-elevated;
141
-
142
- .navbar-nav > li {
143
- > a,
144
- .navbar-title,
145
- .navbar-text {
146
- color: var(--color-background-screen);
147
-
148
- @media (--screen-sm-max) {
149
- color: var(--color-content-primary);
150
- }
151
- }
152
- &.active {
153
- > a {
154
- color: var(--color-content-accent-active);
155
- }
156
- }
157
- }
158
-
159
- // Undo the rounded corners
160
-
161
- @media (--screen-md) {
162
- border-radius: 0;
163
- }
164
- }
165
-
166
- .navbar.affix {
167
- top: (-1 * @navbar-height);
168
- border-top-width: @navbar-height;
169
- transition: border-top-width 0.2s ease-out, background-color 0.2s ease-out;
170
- }
171
-
172
- .navbar-fixed-top {
173
- top: 0;
174
-
175
- .container,
176
- .container-fluid {
177
- margin-bottom: -1px;
178
- }
179
- }
180
-
181
- .navbar-fixed-bottom {
182
- bottom: 0;
183
- margin-bottom: 0; // override .navbar defaults
184
-
185
- .container,
186
- .container-fluid {
187
- margin-top: -1px;
188
- }
189
- }
190
-
191
- // Brand/project name
192
-
193
- .navbar-brand {
194
- .float(left);
195
-
196
- padding: @navbar-padding-vertical @navbar-padding-horizontal
197
- (@navbar-padding-vertical - 3px);
198
- font-size: var(--size-16); // Was 18px
199
- line-height: @navbar-line-height;
200
- margin-top: 12px;
201
- .margin(right, 10px);
202
-
203
- height: (@spacer * 3);
204
- width: 118px;
205
-
206
- &:hover,
207
- &:focus {
208
- text-decoration: none;
209
- }
210
-
211
- > img {
212
- display: block;
213
- }
214
- }
215
-
216
- // Navbar toggle
217
- //
218
- // Custom button for toggling the `.navbar-collapse`, powered by the collapse
219
- // JavaScript plugin.
220
-
221
- .navbar-toggle {
222
- position: relative;
223
- .float(left);
224
-
225
- padding: 9px 0;
226
- .navbar-vertical-align(34px);
227
-
228
- background-color: transparent;
229
- background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
230
- border: 0;
231
- .margin(right, 12px);
232
-
233
- // We remove the `outline` here, but later compensate by attaching `:hover`
234
- // styles to `:focus`.
235
-
236
- &:focus {
237
- outline: 0;
238
- }
239
-
240
- font-size: var(--font-size-16);
241
- font-weight: var(--font-weight-semi-bold);
242
- line-height: var(--line-height-body);
243
- margin-bottom: 8px;
244
- color: @color-navy-content-primary;
245
-
246
- .icon-bar:first-child {
247
- margin-top: 1px;
248
- }
249
-
250
- // Bars
251
-
252
- .icon-bar {
253
- display: block;
254
- width: 22px;
255
- height: 2px;
256
- border-radius: 1px;
257
- background-color: var(--color-content-accent);
258
- }
259
-
260
- .icon-bar + .icon-bar {
261
- margin-top: 4px;
262
- }
263
-
264
- &:hover,
265
- &:focus {
266
- color: var(--color-content-accent-hover);
267
-
268
- .icon-bar {
269
- background-color: var(--color-content-accent-hover);
270
- }
271
- }
272
-
273
- @media (--screen-md) {
274
- display: none;
275
- }
276
- }
277
-
278
- // Navbar nav links
279
- //
280
- // Builds on top of the `.nav` components with its own modifier class to make
281
- // the nav the full height of the horizontal nav (above 768px).
282
-
283
- .navbar-nav {
284
- > li {
285
- > a,
286
- > button {
287
- padding: @navbar-padding;
288
- line-height: @navbar-line-height;
289
- outline-offset: -1px;
290
- transition: color ease @transition-duration;
291
-
292
- @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
293
- .padding(left, @padding-small-horizontal);
294
-
295
- .padding(right, @padding-small-horizontal);
296
- }
297
-
298
- &.dropdown-toggle {
299
- height: (@navbar-line-height + (2 * @navbar-padding-vertical));
300
- border: 0;
301
- background: none;
302
- line-height: @navbar-line-height;
303
- width: 100%;
304
- .text-align(left);
305
-
306
- color: var(--color-content-accent);
307
-
308
- &:active,
309
- &:focus {
310
- border-bottom-color: transparent;
311
- outline: 0;
312
- color: var(--color-content-accent-active);
313
- }
314
-
315
- @media (--screen-md) {
316
- .navbar-inverse & {
317
- color: @color-navy-content-primary;
318
- }
319
-
320
- &:hover {
321
- border-bottom-color: transparent;
322
- outline: 0;
323
- color: var(--color-content-accent-hover);
324
- }
325
- }
326
-
327
- .caret {
328
- .margin(left, (@spacer / 2));
329
- }
330
- }
331
-
332
- &.navbar-title-link {
333
- @media (--screen-md) {
334
- font-size: var(--font-size-20);
335
- }
336
- }
337
- }
338
- }
339
-
340
- > li.divider {
341
- display: none;
342
- }
343
-
344
- @media (max-width: @grid-float-breakpoint-max) {
345
- > li {
346
- > a,
347
- > button {
348
- font-size: var(--font-size-16);
349
- padding: @navbar-padding-mobile;
350
- -webkit-touch-callout: none; // When a target is touched and held on iPhone OS, Safari displays a callout information about the link. This property allows disabling that behavior.
351
- }
352
- }
353
-
354
- // Dropdowns get custom display when collapsed
355
-
356
- .navbar-collapse-flatten {
357
- .dropdown-toggle {
358
- display: none;
359
- }
360
-
361
- .dropdown-menu {
362
- position: static;
363
- margin-top: 0;
364
- background-color: transparent;
365
- border: 0;
366
- display: block;
367
- float: none;
368
- width: 100%;
369
- box-shadow: none;
370
- padding: @padding-large-vertical 0;
371
-
372
- > li > a {
373
- padding: @navbar-padding-mobile;
374
- }
375
- }
376
- }
377
-
378
- > li.divider {
379
- display: block;
380
- .nav-divider(var(--color-interactive-secondary));
381
- }
382
-
383
- > li > a {
384
- color: var(--color-content-accent);
385
- overflow: hidden;
386
- text-overflow: ellipsis;
387
- white-space: nowrap;
388
-
389
- &:hover,
390
- &:focus {
391
- color: var(--color-content-accent-hover);
392
- }
393
-
394
- &:active {
395
- color: var(--color-content-accent-active);
396
- }
397
- }
398
- }
399
-
400
- // Uncollapse the nav
401
-
402
- @media (--screen-md) {
403
- .float(left);
404
-
405
- > li {
406
- .float(left);
407
-
408
- > a {
409
- padding-bottom: (@navbar-padding-vertical - 2px);
410
- font-size: var(--font-size-14);
411
- }
412
- }
413
- }
414
- }
415
-
416
- // Navbar form
417
- //
418
- // Extension of the `.form-inline` with some extra flavor for optimum display in
419
- // our navbars.
420
-
421
- .navbar-form {
422
- padding: 8px @navbar-padding-horizontal;
423
-
424
- .form-group {
425
- @media (max-width: @grid-float-breakpoint-max) {
426
- margin-bottom: 4px;
427
-
428
- &:last-child {
429
- margin-bottom: 0;
430
- }
431
- }
432
- }
433
-
434
- // Undo 100% width for pull classes
435
-
436
- @media (--screen-md) {
437
- width: auto;
438
- border: 0;
439
- margin-left: 0;
440
- margin-right: 0;
441
- padding-top: 0;
442
- padding-bottom: 0;
443
- box-shadow: none;
444
-
445
- // Vertically center in expanded, horizontal navbar
446
-
447
- margin-top: 12px;
448
- margin-bottom: 12px;
449
-
450
- // Mixin behavior for optimum display
451
-
452
- .form-inline();
453
- }
454
-
455
- @media (max-width: @grid-float-breakpoint) {
456
- border-bottom: 1px solid var(--color-border-neutral);
457
- }
458
- }
459
-
460
- // Dropdown menus
461
-
462
- // Menu position and menu arrows
463
-
464
- .navbar-nav {
465
- > li {
466
- > .dropdown-menu {
467
- margin-top: @navbar-height;
468
- .arrow-pointer(@dropdown-arrow-width);
469
-
470
- > li > a {
471
- font-size: var(--font-size-14);
472
-
473
- @media (max-width: @grid-float-breakpoint) {
474
- position: relative;
475
- -webkit-touch-callout: none; // When a target is touched and held on iPhone OS, Safari displays a callout information about the link. This property allows disabling that behavior.
476
-
477
- .badge {
478
- position: absolute;
479
- top: (@spacer * 2);
480
- .right(0);
481
-
482
- padding: 5px;
483
- text-indent: @navbar-collapse-max-width;
484
- width: @spacer;
485
- min-width: @spacer;
486
- height: @spacer;
487
- }
488
- }
489
- }
490
-
491
- > .active > a {
492
- color: var(--color-content-accent-active);
493
- background-color: transparent;
494
- font-weight: var(--font-weight-bold);
495
-
496
- &:hover,
497
- &:focus {
498
- background-color: var(--color-background-neutral);
499
- }
500
- }
501
- }
502
-
503
- @media (max-width: @screen-sm-min) {
504
- > .dropdown-menu-overlay {
505
- margin-top: 0;
506
- }
507
- }
508
-
509
- //show dropdowns in other states
510
-
511
- &.dropdown {
512
- &:active,
513
- &:focus,
514
- &:focus-within,
515
- &.focus-within {
516
- > a,
517
- > button {
518
- color: var(--color-content-accent-active);
519
- }
520
-
521
- .dropdown-menu {
522
- .dropdown-menu-open();
523
- }
524
- }
525
-
526
- &:hover {
527
- @media (--screen-md) {
528
- .dropdown-menu {
529
- .dropdown-menu-open();
530
- }
531
- }
532
- }
533
- }
534
- }
535
- }
536
-
537
- //Dropdown arrows
538
-
539
- .navbar-right,
540
- .pull-xs-right {
541
- li > .dropdown-menu {
542
- &::before {
543
- .right(calc((@dropdown-arrow-width * 2) + (@dropdown-arrow-width / 2)));
544
-
545
- .left(auto);
546
-
547
- @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
548
- .right((@dropdown-arrow-width * 2));
549
- }
550
- }
551
- }
552
-
553
- &.dropdown-menu-center {
554
- &::before {
555
- .right(auto);
556
-
557
- .left(50%);
558
-
559
- .margin(left, (@dropdown-arrow-width / -2));
560
- }
561
- }
562
- }
563
-
564
- // Menu position and menu caret support for dropups via extra dropup class
565
-
566
- .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
567
- margin-bottom: 0;
568
- }
569
-
570
- // Buttons in navbars
571
- //
572
- // Vertically center a button within a navbar (when *not* in a form).
573
-
574
- .navbar-btn {
575
- .navbar-vertical-align(@input-height-small);
576
-
577
- &.btn-sm {
578
- .navbar-vertical-align(@input-height-small);
579
- }
580
-
581
- &.btn-xs {
582
- .navbar-vertical-align(22);
583
- }
584
-
585
- font-weight: var(--font-weight-semi-bold);
586
-
587
- @media (max-width: @grid-float-breakpoint-max) {
588
- display: block;
589
- }
590
- }
591
-
592
- // Text in navbars
593
- //
594
- // Add a class to make any element properly align itself vertically within the navbars.
595
-
596
- .navbar-text {
597
- .navbar-vertical-align(@size-24);
598
-
599
- @media (--screen-md) {
600
- .float(left);
601
- margin-left: @navbar-padding-horizontal;
602
- margin-right: @navbar-padding-horizontal;
603
- }
604
- }
605
-
606
- // Component alignment
607
- //
608
- // Repurpose the pull utilities as their own navbar utilities to avoid specificity
609
- // issues with parents and chaining. Only do this when the navbar is uncollapsed
610
- // though so that navbar contents properly stack and align in mobile.
611
- //
612
- // Declared after the navbar components to ensure more specificity on the margins.
613
-
614
- @media (--screen-md) {
615
- .navbar-left {
616
- .pull-xs-left();
617
- }
618
-
619
- .navbar-right {
620
-
621
- .pull-xs-right();
622
-
623
- ~ .navbar-right {
624
- .margin(right, 0);
625
- }
626
- }
627
- }
628
-
629
- // Alternate navbars
630
- // --------------------------------------------------
631
-
632
- // Default navbar
633
-
634
- .navbar-default {
635
- background-color: transparent;
636
-
637
- .container,
638
- .container-fluid {
639
- border-color: var(--color-border-neutral);
640
- }
641
-
642
- .navbar-brand {
643
- color: @color-navy-content-primary;
644
-
645
- &:hover,
646
- &:focus {
647
- background-color: transparent;
648
- }
649
- }
650
-
651
- .navbar-text {
652
- color: var(--color-content-primary);
653
- }
654
-
655
- .navbar-nav {
656
- > li > a {
657
- color: var(--color-content-primary);
658
-
659
- @media (--screen-md) {
660
- border-bottom: 3px solid transparent;
661
- }
662
-
663
- &:hover,
664
- &:focus {
665
- color: var(--color-content-accent-hover);
666
- background-color: transparent;
667
- }
668
- }
669
-
670
- > .active {
671
- > a,
672
- > .dropdown-toggle {
673
-
674
- font-weight: var(--font-weight-bold);
675
- &,
676
- &:hover,
677
- &:focus {
678
- color: var(--color-content-accent-active);
679
- background-color: transparent;
680
- border-color: transparent;
681
- }
682
- }
683
- }
684
- }
685
-
686
- // Dropdown menu items
687
-
688
- .navbar-nav {
689
- // Remove background color from open dropdown
690
-
691
- > .open > a {
692
- &,
693
- &:hover,
694
- &:focus,
695
- &:focus-within {
696
- background-color: transparent;
697
- color: var(--color-content-accent-active);
698
- }
699
- }
700
-
701
- @media (max-width: @grid-float-breakpoint-max) {
702
- // Dropdowns get custom display when collapsed
703
-
704
- .open .dropdown-menu {
705
- > li > a {
706
- color: var(--color-content-accent);
707
-
708
- &:hover,
709
- &:focus,
710
- &:focus-within {
711
- color: var(--color-content-accent-hover);
712
- background-color: transparent;
713
- }
714
- }
715
-
716
- > .active > a {
717
- font-weight: var(--font-weight-bold);
718
- &,
719
- &:hover,
720
- &:focus {
721
- color: var(--color-content-accent-active);
722
- background-color: transparent;
723
- }
724
- }
725
- }
726
- }
727
- }
728
-
729
- // Links in navbars
730
- //
731
- // Add a class to ensure links outside the navbar nav are colored correctly.
732
-
733
- .navbar-link {
734
- color: var(--color-content-accent);
735
-
736
- &:hover {
737
- color: var(--color-content-accent-hover);
738
- }
739
- }
740
-
741
- .btn-link {
742
- color: var(--color-content-accent);
743
-
744
- &:hover,
745
- &:focus {
746
- color: var(--color-content-accent-hover);
747
- }
748
- }
749
- }
750
-
751
- // Inverse navbar
752
-
753
- .navbar-inverse {
754
- background-color: transparent;
755
-
756
- .container,
757
- .container-fluid {
758
- border-color: var(--color-border-neutral);
759
- }
760
-
761
- .navbar-brand {
762
- color: var(--color-content-primary);
763
-
764
- &:hover,
765
- &:focus {
766
- color: var(--color-content-primary);
767
- background-color: transparent;
768
- }
769
- }
770
-
771
- .navbar-text {
772
- color: @color-navy-content-primary;
773
- }
774
-
775
- .navbar-nav {
776
- > li > a {
777
- color: @color-navy-content-primary;
778
-
779
- @media (--screen-md) {
780
- border-bottom: 3px solid transparent;
781
- }
782
-
783
- &:hover,
784
- &:focus {
785
- color: var(--color-content-accent-hover);
786
- background-color: transparent;
787
- }
788
- }
789
-
790
- > .active {
791
- > a,
792
- > .dropdown-toggle {
793
- color: var(--color-content-accent-active);
794
- font-weight: var(--font-weight-bold);
795
- &,
796
- &:hover,
797
- &:focus {
798
- color: var(--color-content-accent-hover);
799
- background-color: transparent;
800
- border-color: transparent;
801
- }
802
- }
803
- }
804
-
805
- > .open > a,
806
- .dropdown:focus-within > a {
807
- &,
808
- &:hover,
809
- &:focus {
810
- background-color: transparent;
811
- color: var(--color-content-accent-hover);
812
- }
813
- }
814
-
815
- @media (max-width: @grid-float-breakpoint-max) {
816
- > li > a {
817
- color: var(--color-content-primary);
818
- }
819
- }
820
- }
821
-
822
- .navbar-link {
823
- color: @color-navy-content-primary;
824
-
825
- &:hover {
826
- color: var(--color-content-accent-hover);
827
- }
828
- }
829
-
830
- .btn-link {
831
- color: @color-navy-content-primary;
832
-
833
- &:hover,
834
- &:focus {
835
- color: var(--color-content-accent-hover);
836
- }
837
- }
838
- }
839
-
840
- .navbar .navbar-brand,
841
- .navbar-inverse .navbar-brand {
842
- background-repeat: no-repeat;
843
- background-position: 50% 50%;
844
- color: transparent;
845
-
846
- &:hover,
847
- &:focus {
848
- color: transparent;
849
- }
850
- }
851
-
852
- .navbar .flag, .navbar .fast-flag {
853
- height: 24px;
854
- width: 24px;
855
- margin-top: 16px;
856
- .margin(right, 8px);
857
-
858
- .float(left);
859
- }
860
-
861
- .navbar .logo-text {
862
- height: 20px;
863
- width: 104px;
864
- margin-top: 16.5px;
865
- .margin(right, 8px);
866
-
867
- .float(left);
868
- }
869
-
870
- .cover {
871
- display: none;
872
- }
873
-
874
- @media (max-width: @grid-float-breakpoint-max) {
875
- .navbar-collapse {
876
- position: fixed;
877
- bottom: 0;
878
- left: 0;
879
- right: 0;
880
- height: 100% !important;
881
-
882
- // Backwards compatibility if collapse-panel missing
883
-
884
- background-color: var(--color-background-screen);
885
- top: (@navbar-height - 2px);
886
- padding: 8px;
887
-
888
- .open,
889
- .dropdown:focus-within,
890
- .dropdown.focus-within {
891
- border-bottom: none;
892
-
893
- > a {
894
- color: var(--color-content-accent);
895
- }
896
-
897
- .caret {
898
- transform: rotate(-180deg);
899
- }
900
- }
901
-
902
- &.navbar-collapse-with-panel {
903
- top: 0;
904
- padding: 0;
905
- background-color: transparent;
906
- }
907
-
908
- .navbar-collapse-panel {
909
- position: fixed;
910
- height: 100%;
911
- top: 0;
912
- overflow-y: scroll;
913
- padding: 8px;
914
- background-color: var(--color-background-screen);
915
- color: var(--color-content-primary) !important;
916
- width: @navbar-collapse-max-width;
917
- max-width: @navbar-collapse-max-width !important;
918
- transition: transform 0.35s ease;
919
- transform: translateX(-@navbar-collapse-max-width);
920
- }
921
-
922
- .navbar-nav {
923
- > li {
924
- border-bottom: 1px solid var(--color-border-neutral);
925
- }
926
- }
927
-
928
- .dropdown-menu {
929
- position: relative;
930
- width: 100%;
931
- box-shadow: none;
932
- padding: 0;
933
- padding-bottom: @padding-large-vertical;
934
- float: none;
935
- margin-top: 0 !important;
936
- border-bottom: 1px solid var(--color-border-neutral);
937
-
938
- &::before {
939
- display: none;
940
- }
941
-
942
- .dropdown-header {
943
- padding: @navbar-padding-mobile;
944
- }
945
- }
946
-
947
- .navbar-toggle {
948
- .left(280px);
949
-
950
- opacity: 0;
951
- transition: opacity 0.35s ease;
952
- display: inline-block;
953
- position: absolute;
954
- top: 4px;
955
-
956
- &.close {
957
- margin-top: 0;
958
- padding: 9px 0;
959
- }
960
- }
961
-
962
- // Only show toggle after animation finished
963
-
964
- &.in {
965
- .navbar-toggle {
966
- opacity: 1;
967
- }
968
- }
969
-
970
- .cover {
971
- display: block;
972
- width: 100%;
973
- height: 100%;
974
- background-color: @color-navy-background-screen;
975
- opacity: 0;
976
- transition: opacity 0.35s ease;
977
- }
978
-
979
- &.in,
980
- &[aria-expanded='true'] {
981
- .cover {
982
- opacity: 0.9;
983
- }
984
-
985
- .navbar-collapse-panel {
986
- transform: translateX(0);
987
- }
988
- }
989
-
990
- .navbar-btn.btn-group {
991
- display: flex;
992
-
993
- .btn {
994
- display: block;
995
- width: 100%;
996
- .text-align(left);
997
-
998
- + .dropdown-toggle {
999
- flex: 0;
1000
- }
1001
- }
1002
-
1003
- .dropdown-menu {
1004
- width: 100%;
1005
- }
1006
- }
1007
- }
1008
- }
1009
-
1010
- .navbar .profile-name {
1011
- .np-theme-light & {
1012
- padding-bottom: 3px;
1013
- }
1014
-
1015
- .caret {
1016
- vertical-align: top;
1017
- line-height: @navbar-line-height;
1018
- }
1019
-
1020
- .text-ellipses,
1021
- .text-ellipsis,
1022
- .truncate {
1023
- max-width: 75px;
1024
- display: inline-block;
1025
- }
1026
-
1027
- @media (min-width: @screen-lg-min) {
1028
- .text-ellipses,
1029
- .text-ellipsis,
1030
- .truncate {
1031
- max-width: 125px;
1032
- }
1033
- }
1034
-
1035
- @media (min-width: @screen-xl-min) {
1036
- .text-ellipses,
1037
- .text-ellipsis,
1038
- .truncate {
1039
- max-width: 220px;
1040
- }
1041
- }
1042
- }
1043
-
1044
- .navbar[data-spy~='affix'] + * {
1045
- margin-top: 0;
1046
- }
1047
-
1048
- .navbar[data-spy~='affix'].affix + * {
1049
- margin-top: @navbar-height;
1050
- }
1051
-
1052
- @media (min-width: @screen-md-min) {
1053
- .navbar + .jumbotron,
1054
- .navbar + .jumbotron-image,
1055
- .navbar + .jumbotron-image-inverse,
1056
- .jumbotron-image-adjacent-to-navbar {
1057
- margin-top: (-1 * @navbar-height - 2px);
1058
- }
1059
-
1060
- .navbar.affix + .jumbotron,
1061
- .navbar.affix + .jumbotron-image,
1062
- .navbar.affix + .jumbotron-image-inverse {
1063
- margin-top: 0;
1064
- }
1065
- }
1066
-
1067
- .navbar + .jumbotron,
1068
- .navbar + .jumbotron-image > .jumbotron,
1069
- .navbar + .jumbotron-image-inverse > .jumbotron,
1070
- .jumbotron-image-adjacent-to-navbar > .jumbotron {
1071
- padding-bottom: 64px;
1072
-
1073
- @media (min-width: @screen-md-min) {
1074
- padding-top: 140px;
1075
- padding-bottom: 104px;
1076
- }
1077
- }
1078
-
1079
- .navbar {
1080
- > .container .navbar-brand,
1081
- > .container-fluid .navbar-brand {
1082
- .margin(left, 0);
1083
- }
1084
- }
1085
-
1086
- @media (max-width: @screen-sm-max) {
1087
- .navbar-static-top {
1088
- background-color: @color-navy-background-elevated;
1089
- border-bottom-color: transparent;
1090
- }
1091
- }
1092
-
1093
- .navbar-title {
1094
- .float(left);
1095
- font-size: var(--font-size-20);
1096
- line-height: var(--line-height-title);
1097
- margin-top: 12px;
1098
- margin-bottom: 12px;
1099
- font-weight: var(--font-weight-bold);
1100
- }
1101
-
1102
- .navbar-subtitle {
1103
- font-size: var(--font-size-14);
1104
- margin-bottom: 8px;
1105
- }
1106
-
1107
- .navbar-title,
1108
- .navbar-subtitle {
1109
- color: @color-navy-content-primary;
1110
- text-overflow: ellipsis;
1111
- overflow-x: hidden;
1112
- white-space: nowrap;
1113
- display: inline-block;
1114
- width: 75%;
1115
-
1116
- @media (min-width: @screen-lg-min) {
1117
- color: var(--color-content-primary);
1118
- width: 100%;
1119
- }
1120
- }
1121
-
1122
- .navbar-logo {
1123
- width: 127px;
1124
- height: 22px;
1125
- margin-top: 13px;
1126
- margin-bottom: 21px;
1127
- }
1128
-
1129
- @nav-toolbar-height: 64px;
1130
-
1131
- .nav-toolbar {
1132
- padding-top: 16px;
1133
- margin-top: -16px;
1134
- padding-bottom: 0;
1135
- background-color: @color-navy-background-elevated;
1136
- border-bottom: 1px solid var(--color-border-neutral);
1137
-
1138
- @media (min-width: @screen-lg-min) {
1139
- margin-top: 0;
1140
- background-color: var(--color-background-screen);
1141
-
1142
- &.affix {
1143
- top: 0;
1144
- z-index: @zindex-navbar;
1145
- margin-top: 0;
1146
- border-top: 0;
1147
- position: fixed;
1148
- backface-visibility: hidden;
1149
-
1150
- + .container,
1151
- + .container-fluid {
1152
- margin-top: @nav-toolbar-height !important;
1153
- }
1154
- }
1155
- }
1156
-
1157
- @media (max-width: @screen-md-max) {
1158
- &.affix {
1159
- // we have a global affix rule which would be breaking to remove
1160
-
1161
- position: relative !important;
1162
-
1163
- + .container,
1164
- + .container-fluid {
1165
- margin-top: 0 !important;
1166
- }
1167
- }
1168
-
1169
- .btn-info:not(.disabled, :disabled),
1170
- .btn-warning:not(.disabled, :disabled),
1171
- .btn-danger:not(.disabled, :disabled) {
1172
- color: var(--color-content-accent);
1173
- border-color: var(--color-interactive-accent);
1174
- }
1175
-
1176
- .btn-info:not(.disabled, :disabled):hover,
1177
- .btn-warning:not(.disabled, :disabled):hover,
1178
- .btn-danger:not(.disabled, :disabled):hover {
1179
- color: @color-navy-content-primary;
1180
- }
1181
-
1182
- .form-control,
1183
- .input-group,
1184
- .btn-input,
1185
- .input-group-addon {
1186
- border-color: #ffffff;
1187
- }
1188
- }
1189
-
1190
- h1 {
1191
- line-height: var(--line-height-title);
1192
- }
1193
-
1194
- .close {
1195
- text-decoration: none;
1196
- height: 32px;
1197
- }
1198
- }
1199
-
1200
- .nav-toolbar--compact {
1201
- @media (min-width: @screen-lg-min) {
1202
- padding-top: 0;
1203
- }
1204
- }
1205
-
1206
- @media (min-width: @screen-lg-min) {
1207
- .column-layout .nav-toolbar.affix {
1208
- // Use comment to allow older LESS compilers to work.
1209
-
1210
- width: ~'calc(100% - @{column-width})';
1211
- }
1212
- }
1213
-
1214
- // TODO this is a hack with no docs
1215
-
1216
- .simple-nav {
1217
- background-color: @color-navy-background-elevated;
1218
-
1219
- .navbar-nav > li > a {
1220
- padding-top: (@navbar-padding-vertical + 4px);
1221
- padding-bottom: (@navbar-padding-vertical + 1px);
1222
- }
1223
-
1224
- .navbar-header {
1225
- padding-top: 4px;
1226
- width: ~'calc(100% - 140px)';
1227
-
1228
- @media (min-width: @screen-md-min) {
1229
- width: ~'calc(100% - 340px)';
1230
- }
1231
- }
1232
-
1233
- .navbar-nav > li > a.dropdown-toggle {
1234
- height: @nav-toolbar-height;
1235
- }
1236
-
1237
- > .navbar-right li > a {
1238
- // HACK - better to make things only collapse if inside collapse
1239
-
1240
- .float(right);
1241
- }
1242
- }
1243
-
1244
- @media (min-width: @screen-sm-min) {
1245
- .simple-nav .navbar-nav > li > a {
1246
- font-size: var(--font-size-16) !important;
1247
- }
1248
- }
1249
-
1250
- @media (min-width: @screen-lg-min) {
1251
- .simple-nav {
1252
- background-color: var(--color-background-screen);
1253
- border-bottom: 1px solid var(--color-border-neutral);
1254
- }
1255
- }
1256
-
1257
- @media (max-width: @screen-md-max) {
1258
- .simple-nav .navbar-nav > li > a {
1259
- color: @color-navy-content-primary;
1260
-
1261
- &:not(.disabled, :disabled):focus,
1262
- &:not(.disabled, :disabled):hover,
1263
- &:not(.disabled, :disabled):active {
1264
- color: var(--color-content-accent-hover);
1265
- }
1266
- }
1267
- }
1268
-
1269
- .simple-nav .profile-name .text-ellipses,
1270
- .simple-nav .profile-name .text-ellipsis,
1271
- .simple-nav .profile-name .truncate {
1272
- max-width: 240px;
1273
- }
1274
-
1275
- //Public-nav
1276
-
1277
- .tw-public-navigation-item-content__icon {
1278
- vertical-align: middle;
1279
- }
1280
-
1281
- .tw-public-navigation-item-content__text {
1282
- display: inline-block;
1283
- vertical-align: middle;
1284
- max-width: 164px;
1285
- }
1286
-
1287
- // Secondary navigation
1288
-
1289
- @media (--screen-md) {
1290
- .subnav {
1291
- height: (
1292
- @navbar-secondary-height * 2
1293
- ) !important; //this line is necessary until we solve the style="height:0;" in navbar-collapse added when closing the mobile menu
1294
- position: relative;
1295
- min-height: @navbar-secondary-height;
1296
-
1297
- &::before {
1298
- content: '';
1299
- background-color: transparent;
1300
- width: 100%;
1301
- height: @navbar-secondary-height;
1302
- position: absolute;
1303
- top: @navbar-secondary-height;
1304
- border-top: var(--color-border-neutral) solid 1px;
1305
- .left(0);
1306
- }
1307
-
1308
- &.navbar-inverse {
1309
- &::before {
1310
- background-color: @color-navy-background-screen;
1311
- border-top: none;
1312
- }
1313
- }
1314
-
1315
- .navbar-nav > li {
1316
- > a {
1317
- padding-top: (@navbar-secondary-padding-vertical + 1);
1318
- }
1319
-
1320
- > button {
1321
- height: @navbar-secondary-height;
1322
- }
1323
- }
1324
-
1325
- .navbar-btn,
1326
- .navbar-brand {
1327
- margin-top: (
1328
- @navbar-secondary-padding-vertical + @padding-small-vertical
1329
- );
1330
- }
1331
- }
1332
-
1333
- .subnav-menu {
1334
- position: absolute;
1335
- top: @navbar-secondary-height;
1336
- }
1337
- }
1338
- /* stylelint-enable */