Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: static/scss/_navbar.scss

Issue 29587584: Issue 5635 - Implement website-default navbar component (Closed) Base URL: https://hg.adblockplus.org/website-defaults
Patch Set: Address scalability of navbar padding with logo size Created Dec. 14, 2017, 10:26 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « static/js/navbar.js ('k') | static/scss/_utilities.scss » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // This file is part of help.eyeo.com.
2 // Copyright (C) 2017 Eyeo GmbH
3 //
4 // help.eyeo.com is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // help.eyeo.com is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with help.eyeo.com. If not, see <http://www.gnu.org/licenses/>.
16
17 /*******************************************************************************
18 * Navbar component
19 ******************************************************************************/
20
21 .navbar
22 {
23 @extend .clearfix;
24 }
25
26 /* .navbar .navbar-container
27 ****************************************************************************/
28
29 .navbar-container
30 {
31 @if ($add-horizontal-navbar-padding)
32 {
33 @extend .container;
34 }
35 @else
36 {
37 @include container($container-width, 0px);
38 }
39 }
40
41 /* .navbar .navbar-branding
42 ****************************************************************************/
43
44 .navbar-branding
45 {
46 padding-top: $navbar-padding + ($navbar-padding / 4);
47 padding-bottom: $navbar-padding + ($navbar-padding / 4);
48 line-height: 1;
49
50 @if ($add-horizontal-navbar-padding != true)
51 {
52 padding-right: $navbar-padding;
53 padding-left: $navbar-padding;
54 }
55 }
56
57 .navbar-branding img
58 {
59 height: $navbar-branding-height;
60 vertical-align: text-top;
61 }
62
63 /* .navbar .toggle-navbar-collapse
64 ****************************************************************************/
65
66 .toggle-navbar-collapse
67 {
68 display: none;
69 padding-top: ($navbar-branding-height / 2) + ($navbar-padding / 2);
70 padding-bottom: ($navbar-branding-height / 2) + ($navbar-padding / 2);
71
72 @if ($add-horizontal-navbar-padding != true)
73 {
74 padding-right: $navbar-padding;
75 padding-left: $navbar-padding;
76 }
77 }
78
79 .js .toggle-navbar-collapse
80 {
81 display: block;
82
83 @media (min-width: $tablet-breakpoint)
84 {
85 display: none;
86 }
87 }
88
89 /* .navbar .navbar-collapse
90 ****************************************************************************/
91
92 .navbar-collapse
93 {
94 clear: both;
95
96 @media (min-width: $tablet-breakpoint)
97 {
98 float: right;
99 clear: none;
100 }
101 }
102
103 [dir="rtl"] .navbar-collapse
104 {
105 float: left;
106 }
107
108 .js .navbar-collapse
109 {
110 display: none;
111
112 @media (min-width: $tablet-breakpoint)
113 {
114 display: block;
115 }
116 }
117
118 .expanded .navbar-collapse
119 {
120 display: block;
121 width: 100%;
122
123 @media (min-width: $tablet-breakpoint)
124 {
125 width: auto;
126 }
127 }
128
129 /* .navbar .navbar-nav
130 ****************************************************************************/
131
132 @if ($add-horizontal-navbar-padding)
133 {
134 .navbar .navbar-nav
135 {
136 padding-bottom: $navbar-padding / 2;
137
138 @media (min-width: $tablet-breakpoint)
139 {
140 margin-right: -($navbar-padding / 2);
141 margin-left: -($navbar-padding / 2);
142 padding-bottom: 0;
143 }
144 }
145 }
146
147 .navbar .navbar-nav li
148 {
149 @media (min-width: $tablet-breakpoint)
150 {
151 display: inline-block;
152 }
153 }
154
155 .navbar .navbar-nav a
156 {
157 display: block;
158 padding-top: $navbar-padding / 2;
159 padding-bottom: $navbar-padding / 2;
160
161 @if ($add-horizontal-navbar-padding != true)
162 {
163 padding-right: $navbar-padding;
164 padding-left: $navbar-padding;
165 }
166
167 @media (min-width: $tablet-breakpoint)
168 {
169 padding-top: ($navbar-branding-height / 2) + ($navbar-padding / 2);
170 padding-right: $navbar-padding / 2;
171 padding-bottom: ($navbar-branding-height / 2) + ($navbar-padding / 2);
172 padding-left: $navbar-padding / 2;
173 }
174 }
OLDNEW
« no previous file with comments | « static/js/navbar.js ('k') | static/scss/_utilities.scss » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld