Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Commit 869e598

Browse files
author
Thimy
authored
Merge pull request #100 from etalab/margin-padding-improvements
Small improvements regarding margins and other improvements from reboot
2 parents 75f020b + 6d7373c commit 869e598

14 files changed

Lines changed: 51 additions & 50 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
- Added a `required` class to `labels` to inform about _required_ fields
88
- Change padding unit on inputs
9+
- Reworked the way cards and panels are spaced
10+
- Removed `.form__container`; use `.container__small` instead
11+
- Removed box shadow from buttons
912

1013
#### Bug fixes
1114

index.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -486,16 +486,16 @@ <h3>Lorem Ipsum</h3>
486486

487487
<section class="section section-grey">
488488
<div class="container">
489-
<div class="form__container">
490-
<form action="#" method="post" name="form" target="_blank" novalidate>
491-
<div class="form__group">
492-
<label for="form-email">Pour être informé des nouveautés, inscrivez-vous à notre newsletter :</label>
489+
<form action="#" method="post" name="form" target="_blank" novalidate>
490+
<h1>Newsletter</h1>
491+
<div class="form__group">
492+
<label for="form-email">Pour être informé des nouveautés, inscrivez-vous à notre newsletter :</label>
493+
<div class="input__group">
493494
<input type="email" value="" name="email" id="form-email">
495+
<button class="button" type="submit" name="subscribe" id="form-submit">Valider</button>
494496
</div>
495-
496-
<button class="button" type="submit" name="subscribe" id="form-submit">Valider</button>
497-
</form>
498-
</div>
497+
</div>
498+
</form>
499499
</div>
500500
</section>
501501

src/css/base/typography.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ h3,
1212
h4,
1313
h5,
1414
h6 {
15+
margin-top: 0;
1516
font-family: "Evolventa", "Trebuchet MS", sans-serif;
1617
}
1718

src/css/components/card.css

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
border: 1px solid var(--theme-border-lighter);
1212
}
1313

14-
.row .card {
15-
margin: 0 1em;
14+
.row .card + .card {
15+
margin-left: var(--space-m);
1616
}
1717

1818
@media (--smaller-than-tablet) {
@@ -21,7 +21,8 @@
2121
}
2222

2323
.row > .card + .card {
24-
margin-top: 2em;
24+
margin-left: 0;
25+
margin-top: var(--space-m);
2526
}
2627
}
2728

@@ -30,6 +31,10 @@
3031
width: 100%;
3132
overflow: hidden;
3233
position: relative;
34+
display: flex;
35+
align-items: center;
36+
justify-content: center;
37+
background-color: var(--theme-background-color);
3338
}
3439

3540
.card__cover img {

src/css/components/form.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
form {
2-
max-width: 520px;
2+
max-width: 35em;
33
margin: 0 auto;
44
}
55

@@ -20,11 +20,6 @@ label.label-inline {
2020
margin-left: var(--space-xs);
2121
}
2222

23-
.form__container {
24-
max-width: 35em;
25-
margin: auto;
26-
}
27-
2823
.form__group {
2924
position: relative;
3025
display: block;
@@ -75,3 +70,8 @@ fieldset {
7570
width: 16px;
7671
height: 16px;
7772
}
73+
74+
.input__group .button {
75+
flex-shrink: 0;
76+
margin-left: var(--space-s);
77+
}

src/css/components/panel.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@
77
border: 1px solid var(--theme-border-lighter);
88
}
99

10-
.panel + * {
11-
margin-top: var(--space-m);
12-
}
13-
14-
.panel > :first-child {
15-
margin-top: 0;
16-
}
17-
1810
.panel > :last-child {
1911
margin-bottom: 0;
2012
}
@@ -31,9 +23,6 @@
3123

3224
.panel__header h3 {
3325
display: inline-block;
34-
}
35-
36-
.panel__header h3:first-of-type {
3726
margin: 0;
3827
}
3928

src/css/elements/button.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ input[type="button"]:visited {
2020
background-color: var(--theme-primary);
2121
border-radius: var(--theme-border-radius);
2222
border: 0;
23-
box-shadow: 0 -2px inset var(--theme-primary-dark);
2423
font-family: "Source Sans Pro", Arial, sans-serif;
2524
font-size: var(--space-s);
2625
position: relative;
@@ -41,8 +40,6 @@ button.button:active,
4140
input[type="submit"]:hover,
4241
input[type="button"]:hover {
4342
transform: translateY(1px);
44-
border-bottom: 0;
45-
box-shadow: none;
4643
}
4744

4845
button::-moz-focus-inner {
@@ -137,7 +134,6 @@ button.button-outline.large {
137134
.button.warning,
138135
a.button.warning {
139136
background-color: var(--red);
140-
box-shadow: 0 -2px inset var(--dark-red);
141137
}
142138

143139
.button.warning:hover,
@@ -148,7 +144,6 @@ a.button.warning {
148144
.button.secondary,
149145
a.button.secondary {
150146
background-color: var(--darker-grey);
151-
box-shadow: 0 -2px inset var(--darkest-grey);
152147
}
153148

154149
.button.secondary:hover,

src/css/elements/table.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
border-left: 0;
55
border-right: 0;
66
border-radius: 2px;
7-
box-shadow: 0 1px 4px var(--theme-box-shadow);
87
position: relative;
98
width: 100%;
109
border-collapse: collapse;

src/css/layouts/article.css

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
.article__preview .article__author {
106106
width: auto;
107107
padding: 0;
108+
margin-bottom: var(--space-s);
108109
}
109110

110111
.article__preview .article__author img {
@@ -125,15 +126,12 @@ a.article__link {
125126
margin-bottom: 0;
126127
}
127128

128-
.article__meta {
129-
margin-bottom: var(--space-s);
130-
}
131-
132129
.article__thumbnail {
133130
width: 100%;
134131
height: 200px;
135132
overflow: hidden;
136133
position: relative;
134+
margin-top: var(--space-s);
137135
}
138136

139137
.article__thumbnail img {

src/css/layouts/container.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.container {
22
position: relative;
33
width: 100%;
4-
max-width: 1000px;
4+
max-width: 1200px;
55
margin: 0 auto;
66
padding: 0 20px;
77
}

0 commit comments

Comments
 (0)