Skip to content

Commit 1785721

Browse files
committed
Improve width of CSS elements for corner cases: empty content, small screens
1 parent b7a31af commit 1785721

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

github-markdown.css

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ td,th {
3131

3232
.container {
3333
display: grid;
34-
grid-template-columns: 2em 1fr 2em;
34+
grid-template-columns: 0.5em 1fr 0.5em;
3535
grid-template-rows: 0fr 1fr 0fr;
3636
max-width: 1020px;
3737
margin-right: auto;
@@ -82,7 +82,7 @@ td,th {
8282

8383
.repository-with-sidebar .repository-sidebar {
8484
float: right;
85-
width: 38px
85+
width: 38px;
8686
}
8787

8888
.repository-with-sidebar .repository-sidebar .sidebar-button {
@@ -104,7 +104,7 @@ td,th {
104104
}
105105

106106
.repository-with-sidebar .repository-sidebar .clone-url.open {
107-
display: block
107+
display: flex;
108108
}
109109

110110
.repository-with-sidebar .repository-sidebar .clone-options {
@@ -121,10 +121,18 @@ td,th {
121121
cursor: pointer
122122
}
123123

124-
.repository-with-sidebar .repository-content {
125-
/* float: left; */
124+
.repository-with-sidebar, .repository-content {
125+
float: left;
126+
width: 100%;
126127
}
127128

129+
@media (min-width: 1020px) {
130+
.repository-with-sidebar, .repository-content {
131+
width: 1020px;
132+
}
133+
}
134+
135+
128136
.repository-with-sidebar.with-full-navigation .repository-content {
129137
}
130138

@@ -246,12 +254,10 @@ td,th {
246254
}
247255

248256
.markdown-body hr:before {
249-
display: flex;
250257
content: "";
251258
}
252259

253260
.markdown-body hr:after {
254-
display: flex;
255261
clear: both;
256262
content: "";
257263
}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<div class="item row1"></div>
6767
<div class="item row1"></div>
6868
<div class="item row2"></div>
69-
<div class="item row2"> // The main row
69+
<div class="item row2">
7070
<div class="repository-with-sidebar repo-container new-discussion-timeline with-full-navigation">
7171
<div id="js-repo-pjax-container" class="repository-content context-loader-container">
7272
<div id="readme" class="boxed-group flush clearfix announce instapaper_body md">

0 commit comments

Comments
 (0)