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