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

Side by Side Diff: static/css/index.css

Issue 29720653: Fixes #30 - Adjustments to hero unit section of index page (Closed) Base URL: https://hg.adblockplus.org/web.adblockplus.org
Patch Set: Rebased Created March 14, 2018, 12:53 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /****************************************************************************** 1 /******************************************************************************
2 * Temparary styles 2 * Temparary styles
3 *****************************************************************************/ 3 *****************************************************************************/
4 4
5 .avoid-wrap {display: inline-block;} 5 .avoid-wrap {display: inline-block;}
6 .small {font-size: smaller;} 6 .small {font-size: smaller;}
7 .maxthon-only {display: none;} 7 .maxthon-only {display: none;}
8 .maxthon .maxthon-only {display: block;} 8 .maxthon .maxthon-only {display: block;}
9 9
10 #content,
11 #blog
12 {
13 padding-top: 5em;
14 }
15
16 /****************************************************************************** 10 /******************************************************************************
17 * #hero-download 11 * #hero-download
18 *****************************************************************************/ 12 *****************************************************************************/
19 13
20 #hero-download 14 #hero-download
21 { 15 {
22 padding-top: 2em; 16 padding: 3em 1em;
23 padding-bottom: 2em;
24 } 17 }
25 18
26 @media(min-width: 768px) 19 @media (min-width: 576px) and (max-width: 1023px)
20 {
21 /* add spacing left/right on tablets */
22 #hero-download
23 {
24 padding-left: 3em;
25 padding-right: 3em;
26 }
27 }
28
29 @media (max-width: 575px)
30 {
31 /* disable avoid-wrap inside h1 on mobile */
32 #hero-download h1 .avoid-wrap
33 {
34 display: inline;
35 }
36 }
37
38 @media (max-width: 1023px)
39 {
40 /* force hero unit columns to break on large tablets */
41 #hero-download .column
42 {
43 width: 100%;
44 }
45 }
46
47 @media (min-width: 1024px)
27 { 48 {
28 #hero-download 49 #hero-download
29 { 50 {
30 padding-top: 6em; 51 padding-top: 6em;
31 padding-bottom: 6em; 52 /* 3em bottom looks like 6em because of thumbnail contents */
ire 2018/03/14 13:27:30 Comment still says 3em
juliandoucette 2018/03/14 14:13:42 Done. Oops :D
53 padding-bottom: 4em;
32 } 54 }
33 } 55 }
34 56
35 #hero-download h1 57 #hero-download h1
36 { 58 {
37 line-height: 1.1; 59 /* Spacing is provided by the hero-download section */
60 margin-top: 0;
61 }
62
63 @media (min-width: 576px)
64 {
65 /* force break without <br> on large screens */
66 #hero-download h1 .avoid-wrap:first-of-type
67 {
68 display: block;
69 }
38 } 70 }
39 71
40 #hero-download-tos 72 #hero-download-tos
41 { 73 {
42 font-size: 10px; 74 margin-bottom: 0.5em;
43 } 75 }
44 76
45 #hero-download-button 77 #hero-download-button
46 { 78 {
47 display: block; 79 display: inline-block;
80 min-width: 250px;
81 /* stretch full-width <= small tablets */
82 width: 100%;
83 /* 0.2em taller than normal buttons */
84 padding-top: 0.8em;
85 padding-bottom: 0.8em;
48 } 86 }
49 87
50 @media(min-width: 768px) 88 @media (min-width: 576px)
51 { 89 {
52 #hero-download-button 90 #hero-download-button
53 { 91 {
54 display: inline-block; 92 /* force auto-width >= small tablets */
55 min-width: 350px; 93 width: auto;
56 } 94 }
57 } 95 }
58 96
59 #hero-download-video 97 #hero-download-video
60 { 98 {
61 display: none; 99 /* add space above on phones & tablets */
100 margin-top: 2em;
101 /* prevent default full-width on small tablets */
102 max-width: 550px;
62 } 103 }
63 104
64 @media(min-width: 768px) 105 @media(min-width: 1024px)
65 { 106 {
66 #hero-download-video 107 #hero-download-video
67 { 108 {
68 display: block; 109 /* keep aligned-top despite padding below */
110 margin-top: -1em;
111 /* provide a little space between thumbnail and border + shadow */
112 padding: 1em;
69 } 113 }
70 } 114 }
71 115
116 #hero-download-video.has-iframe
117 {
118 /* remove space around thumbnail when thumbnail is replaced by video */
119 padding: 0;
120 }
121
122 /** Hide the video border + shadow only when the thumbnail alone is showing */
123 #hero-download-video.hide-disclaimer:not(.has-iframe)
124 {
125 border-color: transparent;
126 /* there is no box-shadow-color property :( */
127 box-shadow: 1px 1px 0 0 transparent;
128 }
129
130 /* The thumbnail is taller than the video. But it's hard to see because of the
131 * reflection and whitespace at the bottom. As a result, I am cutting out the
132 * whitespace and reflection when I show the disclaimer so that the section
133 * doesn't visibly resize when the thumbnail is replaced by the a iframe.
134 */
135
136 #hero-download-video:not(.hide-disclaimer) .video-thumbnail
137 {
138 margin-bottom: -2.5em;
139 }
140
141 #hero-download-video:not(.hide-disclaimer),
142 #hero-download-video.has-iframe
143 {
144 margin-bottom: 2.5em;
145 }
146
72 /****************************************************************************** 147 /******************************************************************************
73 * #media 148 * #media
74 *****************************************************************************/ 149 *****************************************************************************/
75 150
76 #media-section 151 #media-section
77 { 152 {
78 clear: both; 153 clear: both;
79 text-align: center; 154 text-align: center;
80 } 155 }
81 156
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 * #footnote 307 * #footnote
233 *****************************************************************************/ 308 *****************************************************************************/
234 309
235 #footnote 310 #footnote
236 { 311 {
237 padding-top: 3em; 312 padding-top: 3em;
238 padding-bottom: 2em; 313 padding-bottom: 2em;
239 font-size: 13px; 314 font-size: 13px;
240 color: #7d7d7d; 315 color: #7d7d7d;
241 } 316 }
OLDNEW

Powered by Google App Engine
This is Rietveld