Dotclear

source: themes/ductile/mediaqueries.css @ 386:c309e69e93ae

Revision 386:c309e69e93ae, 5.2 KB checked in by kozlika, 14 years ago (diff)

Ductile, jour 5 in progress. Sidebar width now in em unit (and other background-color). Some mobile screen adjustments.

Line 
1@charset "UTF-8";
2
3/* seuils retenus :
4jusqu'à 480px: tout en une colonne, sidebar et stickers en bas
5480px: stickers en haut
6640px: sidebar toujours en bas mais divisé en deux colonnes
71024px: passage à deux colonnes, sidebar à droite
81280px: décalage du post-info vers la gauche
91600px: marges plus grandes */
10
11/* --------------------------------------------------------------------
12     Téléphones (moins de 480px)
13-------------------------------------------------------------------- */
14@media only screen and (max-width:480px) {
15     #prelude, #blogdesc, #supranav span {
16          display: none !important;
17          }
18     h1 {
19          font-size: 1.8em;
20          }
21     h1 a {
22          display: block;
23          padding: 6px 8px;
24          background: #f4f4f5;
25          background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f5), to(#d7d7dC));
26          background: -moz-linear-gradient(top,  #f4f4f5,  #d7d7dC);
27          border-right: 1px solid #aaa;
28          border-bottom: 1px solid #ccc;
29          }
30     #supranav {
31          border:none;
32          margin: 8px 0 0;
33          }
34     #supranav li a {
35          border-right: 0;
36          display: block;
37          padding: 4px 8px;
38          border-bottom: 1px solid #ccc;
39          }
40     h2.post-title {
41          font-size: 2em;
42          }
43     #stickers {
44          margin: 0;
45          padding: 0;
46          border-bottom: 8px solid #fff;
47          }
48     #stickers li {
49          position: relative;
50          line-height: 2.5em;
51          margin-left: 0;
52          padding-left: 0;
53          border: 2px solid #fff;
54          border-left: 6px solid #fff;
55          border-right: 6px solid #fff;
56          }
57     #stickers img {
58          display: block;
59          position: absolute;
60          clip: rect(0px,32px,32px,0px);
61          }
62     #stickers span {
63          margin-left: 40px;
64          }
65     #stickers a {
66          text-decoration: none;
67          }
68}
69
70/* --------------------------------------------------------------------
71     Autres (plus de 480px)
72-------------------------------------------------------------------- */
73
74@media only screen and (min-width: 481px) {
75     #top {
76          padding-top: 24px;
77          }
78     h1 {
79          font-size: 2em;
80          padding-right: 240px;
81          padding-bottom: 4px;
82          margin-left: 32px;
83          }
84     #supranav {
85          margin: 36px 0 0;
86          border-bottom: 1px solid #ccc;
87          }
88     #supranav li {
89          display: inline;
90          padding: 8px 0;
91          }
92     #supranav li a {
93          display: inline-block;
94          padding: 8px 32px 8px 28px;
95          border-right: 1px solid #ccc;
96          }
97     #supranav li a span {
98          display: block;
99          }
100     #stickers {
101          position: absolute;
102          top: 0;
103          right: 0;
104          padding-right: 3%;
105          }
106     #stickers li {
107          display: inline;
108          padding: 0 4px;
109          }
110     #stickers li.last {
111          padding-right: 0;
112          }
113     #stickers li span {
114          display: none;
115          }
116     h2.post-title {
117          font-size: 2.6em;
118          }
119     #stickers li a:hover,
120     #stickers li a:active,
121     #stickers li a:focus {
122          background-color: #fff;
123          border-bottom: 4px solid #ad3f4c;
124          }
125}
126
127/* ------------------------------------------------------ special redimensionnement paysage */
128@media screen and (max-width:640px) and (orientation: landscape) { 
129  body { 
130   -webkit-text-size-adjust: 70%; 
131  } 
132}
133
134/* ------------------------------------------------------ règles communes > 640px */
135@media only screen and (max-width:639px) {
136     body {
137          -webkit-text-size-adjust: none;
138          }
139     #wrapper {
140          padding: 0 2%;
141          }
142     img {
143          max-width: 100%;
144          height: auto;
145          width: auto\9; /* pour ie8 */
146          }
147}
148
149/* ------------------------------------------------------ spécifique 640px à 1024px */
150@media only screen and (min-width: 640px) and (max-width: 1023px) {
151     #wrapper {
152          padding: 0 10%;
153          }
154     #blognav, #blogextra { 
155          width: 48%; float:left;
156          }
157     #blognav {
158          margin-right: 4%;
159          }
160     #stickers {
161          padding-right: 10%;
162          }
163}
164
165/* ------------------------------------------------------ spécifique 840px à 1024px */
166@media only screen and (min-width: 840px) and (max-width: 1023px) {
167     #wrapper {
168          padding: 0 13%;
169          }
170     #stickers {
171          padding-right: 13%;
172          }   
173}
174
175/* ------------------------------------------------------
176     au-delà de 1024px on passe à deux colonnes
177------------------------------------------------------ */
178@media only screen and (min-width: 1024px) {
179     #wrapper {
180          padding: 0 7%;
181          }
182     #main {
183          width : 100%;
184          margin : 0 -17em 0 0;
185          float : left;
186          display: inline;
187          }
188     #content {
189          margin : 0 20em 0 0;
190          padding : 0 0 2em 0;
191          }
192     #sidebar {
193          width : 17em;
194          float : right;
195          }
196     #blognav, #blogextra {
197          margin : 0;
198          }
199     #stickers {
200          padding-right: 7%;
201          }
202     #sidebar #blognav div:first-child {
203          margin-top: 4.66em;
204          }
205     #sidebar div#search:first-child { 
206          background: none;
207          margin-top: 0;
208          margin-bottom: 2em;
209          padding-bottom: 2px;
210          font-size: 1em;
211          border: 1px solid #ddd;
212          border-top: none 0;
213          }
214     #sidebar div#search:first-child h2 {
215          font-size: 1em;
216          text-transform: uppercase;
217          text-shadow: 0 1px 1px rgba(0,0,0,.2);
218          vertical-align: top;
219          color: #666;
220          }
221     #sidebar div#search:first-child p {
222          margin: .33em 0;
223          }
224}
225
226/* ------------------------------------------------------
227     au-delà de 1280px on décale le post-info à gauche
228------------------------------------------------------- */
229@media only screen and (min-width: 1280px) {
230     #content {
231          margin : 0 20em 0 200px;
232          }
233     p.post-info { 
234          margin-left: -200px; 
235          float: left; 
236          width: 150px; 
237          text-align: right;
238          }
239     .dc-archive-month p.post-info {
240          margin-left: 0;
241          float:none;
242          width: auto;
243          text-align: left;
244          }
245}
246
247/* ------------------------------------------------------ au-delà de 1600px */
248@media only screen and (min-width: 1600px) {
249     #wrapper {
250          padding: 0 10%;
251          }
252     #stickers {
253          padding-right: 10%;
254          }
255}
Note: See TracBrowser for help on using the repository browser.

Sites map