Skip to content

Commit 0f92c18

Browse files
authored
update project description - fix code rendering (#3397)
1 parent 286e7d9 commit 0f92c18

File tree

1 file changed

+57
-25
lines changed

1 file changed

+57
-25
lines changed

warehouse/static/sass/blocks/_project-description.scss

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,46 @@
3131
h4,
3232
h5,
3333
h6 {
34-
padding: $spacing-unit 0 0;
34+
padding: 0;
35+
margin: $spacing-unit 0 0;
36+
}
37+
38+
h1 {
39+
font-size: 1.7rem;
40+
}
41+
42+
h1 + p,
43+
h2 + p,
44+
h3 + p,
45+
h4 + p,
46+
h5 + p,
47+
h6 + p {
48+
margin-top: $spacing-unit;
49+
}
50+
51+
// Remove top margin on elements at the top of the description
52+
> div:first-child > *:first-child,
53+
> *:first-child,
54+
> div:first-child > *:first-child,
55+
> *:first-child,
56+
> div:first-child > *:first-child,
57+
> *:first-child,
58+
> div:first-child > *:first-child,
59+
> *:first-child,
60+
> div:first-child > *:first-child,
61+
> *:first-child,
62+
> div:first-child > *:first-child,
63+
> *:first-child {
64+
margin-top: 0;
65+
}
66+
67+
p {
68+
padding: 0;
69+
margin-top: $spacing-unit / 2;
70+
}
71+
72+
li p:first-child {
73+
margin-top: 0;
3574
}
3675

3776
strong,
@@ -47,12 +86,21 @@
4786
pre {
4887
display: block;
4988
padding: $spacing-unit / 2;
50-
margin-bottom: $spacing-unit / 2;
89+
margin: $spacing-unit 0 0;
90+
}
91+
92+
pre code {
93+
font-size: inherit;
94+
padding: 0;
95+
background-color: transparent;
96+
border: 0;
97+
color: inherit;
5198
}
5299

53100
ol,
54101
ul {
55-
margin: ($spacing-unit / 2) 0 ($spacing-unit / 2) $spacing-unit;
102+
margin: ($spacing-unit / 2) 0 0 $spacing-unit;
103+
padding-bottom: 0;
56104

57105
@media only screen and (max-width: $mobile) {
58106
margin-left: $spacing-unit / 2;
@@ -77,7 +125,7 @@
77125
}
78126

79127
blockquote {
80-
margin: ($spacing-unit / 2) 0 ($spacing-unit / 2) ($spacing-unit / 2);
128+
margin: ($spacing-unit / 2) 0 0 ($spacing-unit / 2);
81129
border-left: 3px solid $light-grey;
82130
font-style: italic;
83131
padding-left: ($spacing-unit / 2);
@@ -89,7 +137,7 @@
89137
}
90138

91139
dl {
92-
margin: ($spacing-unit / 2) 0 5px 0;
140+
margin: ($spacing-unit / 2) 0 0 0;
93141

94142
dt {
95143
font-weight: $bold-font-weight;
@@ -102,33 +150,17 @@
102150

103151
table {
104152
@include table;
105-
margin-bottom: $spacing-unit;
153+
margin: $spacing-unit 0 0;
106154
}
107155

108156
hr {
109-
margin: ($spacing-unit / 2) 0;
157+
margin: ($spacing-unit / 2) 0 0;
110158
border: 1px solid $light-grey;
111159
}
112160

113-
// Add a margin at the bottom of commonly included status badges
161+
// Add a margin at the top of commonly included status badges
114162
> a {
115-
margin-bottom: $spacing-unit / 2;
116-
}
117-
118-
// Remove top padding on titles at the top of the description
119-
> div:first-child > h1:first-child,
120-
> h1:first-child,
121-
> div:first-child > h2:first-child,
122-
> h2:first-child,
123-
> div:first-child > h3:first-child,
124-
> h3:first-child,
125-
> div:first-child > h4:first-child,
126-
> h4:first-child,
127-
> div:first-child > h5:first-child,
128-
> h5:first-child,
129-
> div:first-child > h6:first-child,
130-
> h6:first-child {
131-
padding-top: 0;
163+
margin-top: $spacing-unit / 2;
132164
}
133165
}
134166

0 commit comments

Comments
 (0)