Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: chrome/common/extensions/docs/static/sass/_article.scss

Issue 291663002: Adjustments to the fatnav and sidenav, and other CSS updates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Load YouTube video over http or https Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 $toc-width: 240px; 1 $article-width: 70%;
2 $toc-margin-left: 195px; 2 $toc-width: 28%;
3 3
4 // TOC on article pages 4 // TOC on article pages
5 .inline-toc { 5 .inline-toc {
6 line-height: 1.3em; 6 line-height: 1.3em;
7 7
8 a, 8 a,
9 a:link, 9 a:link,
10 a:visited { 10 a:visited {
11 color: $gray-medium; 11 color: $gray-medium;
12 font-weight: normal; 12 font-weight: normal;
(...skipping 14 matching lines...) Expand all
27 } 27 }
28 } 28 }
29 29
30 a { 30 a {
31 @include display-flex(); 31 @include display-flex();
32 padding: 0.5em 0; 32 padding: 0.5em 0;
33 } 33 }
34 34
35 .related { 35 .related {
36 display: block; 36 display: block;
37 background-color: $gray-light;
38 box-shadow: $nav-box-shadow;
39 padding: 1em 1em 0.5em 1em;
40 margin-bottom: 1em; /* so the box shadow doesn't get cut off */
41
42 h3 {
43 margin-top: 0;
44 }
37 45
38 li a { 46 li a {
39 &.active { 47 &.active {
40 color: $black; 48 color: $black;
41 } 49 }
50 &:hover {
51 background-image: $nav-hover-gradient;
52 }
42 } 53 }
43 } 54 }
44 55
45 #toc { 56 #toc {
46 display: none; 57 display: none;
47 58
48 .toplevel { 59 .toplevel {
49 > a { 60 > a {
50 font-weight: bold; 61 font-weight: bold;
51 color: $black; 62 color: $black;
52 63
53 &.hastoc::after { 64 &.hastoc::after {
54 content: '+'; 65 content: '+';
55 @include flex(1); 66 @include flex(1);
56 text-align: right; 67 text-align: right;
57 } 68 }
58 } 69 }
59 } 70 }
60 71
61 //> .toc > li { 72 //> .toc > li {
62 .toplevel { 73 .toplevel {
63 &.active { 74 &.active {
64 .toc { 75 .toc {
65 display: block; 76 display: block;
66 } 77 }
67 > a.hastoc { 78 > a.hastoc {
68 &::after { 79 &::after {
69 content: '-'; 80 content: ''; /* don't make it look like you can toggle it closed */
70 } 81 }
71 } 82 }
72 } 83 }
73 } 84 }
74 } 85 }
75 86
76 .toc { 87 .toc {
77 margin: 0; 88 margin: 0;
78 padding: 0; 89 padding: 0.3em 0 0 0;
79 border-top: $default-border; 90 border-top: $default-border;
80 91
81 .toc { 92 .toc {
82 display: none; 93 display: none;
83 } 94 }
84 95
85 .toc li { 96 .toc li {
86 padding-left: 1em; 97 padding-left: 1em;
87 border-bottom: $default-border; 98 border-bottom: $default-border;
88 } 99 }
(...skipping 15 matching lines...) Expand all
104 .last-updated { 115 .last-updated {
105 @include flex(1); 116 @include flex(1);
106 } 117 }
107 } 118 }
108 119
109 // Large than mobile. 120 // Large than mobile.
110 @media only screen and (min-width: $break-small) { 121 @media only screen and (min-width: $break-small) {
111 .inline-toc { 122 .inline-toc {
112 position: absolute; 123 position: absolute;
113 top: 0; 124 top: 0;
114 left: 50%;
115 margin-left: $toc-margin-left;
116 width: $toc-width; 125 width: $toc-width;
126 right: 0;
117 overflow: auto; 127 overflow: auto;
118 overflow-x: hidden; 128 overflow-x: hidden;
119 129
120 // scroll.js adds and removes the floating class depending on the scroll pos ition.
121 &.sticky {
122 position: fixed;
123 }
124
125 #toc { 130 #toc {
126 display: block; 131 display: block;
132 // article.js adds and removes the fixed nav depending on the scroll posit ion.
133 &.sticky {
134 top: 0;
135 position: fixed;
136 -webkit-transform: translateZ(0); /* repaint issue */
137 }
127 } 138 }
128 } 139 }
129 .article-content { 140 .article-content {
130 width: 70%; 141 width: $article-width;
131 padding-right: 5%; 142 padding-right: 5%;
132 border-right: 1px solid $gray-light; 143 border-right: 1px solid $gray-light;
144 min-height: 250px; /* add min-height so fatnav and sidenav doesn't overlap b adly */
133 } 145 }
134 .cc-logo { 146 .cc-logo {
135 margin: 0 0 0 auto; 147 margin: 0 0 0 auto;
136 } 148 }
137 } 149 }
138 150
139 // Tablet
140 @media only screen and (min-width: $break-small + 1) and (max-width: $break-larg e) {
141 .inline-toc {
142 width: $toc-width - 40;
143 margin-left: $toc-margin-left - 30;
144 }
145 }
146
147 // Phone 151 // Phone
148 @media only screen and (max-width: $break-small) { 152 @media only screen and (max-width: $break-small) {
149 .article-content [itemprop="articleBody"] { 153 .article-content [itemprop="articleBody"] {
150 > .collapsible { 154 > .collapsible {
151 height: 58px; 155 height: 58px;
152 overflow: hidden; 156 overflow: hidden;
153 157
154 &.active { 158 &.active {
155 height: auto; 159 height: auto;
156 h2::before { 160 h2::before {
(...skipping 16 matching lines...) Expand all
173 content: '+'; 177 content: '+';
174 } 178 }
175 } 179 }
176 } 180 }
177 .related { 181 .related {
178 margin: $default-padding 0; 182 margin: $default-padding 0;
179 } 183 }
180 } 184 }
181 } 185 }
182 186
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698