Skip to content

Commit 8a25f7c

Browse files
Merge pull request #570 from creativecommons/correct-responsiveness
App: corrects display of sidebar, stops overflow, binds `main` to fixed width on large viewports
2 parents daef284 + 1422a5a commit 8a25f7c

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

cc_legal_tools/static/cc-legal-tools/base.css

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
@import "/wp-content/themes/vocabulary-theme/style.css" layer(vocabulary-theme);
21
@import "/wp-content/themes/vocabulary-theme/pidgin/css/pidgin.css" layer(vocabulary);
2+
@import "/wp-content/themes/vocabulary-theme/style.css" layer(vocabulary);
3+
34

45

56
body .locale {
67
display: flex;
8+
border-bottom-left-radius: 10px;
9+
border-bottom-right-radius: 10px;
710
}
811

912
body.legal-tools main {
@@ -106,15 +109,23 @@ main > header > span.alt-titles > span.tool-icons > span.cc-icon > svg {
106109
/* right nav */
107110
.cc-legal-tools main > aside {
108111
margin-left: 4.1rem;
109-
padding: 1em;
110112
height: fit-content;
113+
114+
overflow-wrap: break-word;
115+
word-wrap: break-word;
116+
117+
word-break: break-word;
118+
119+
/* Adds a hyphen where the word breaks, if supported (No Blink) */
120+
hyphens: auto;
111121
}
112122
.cc-legal-tools main > aside a {
113123
--underline-background-color: var(--vocabulary-brand-color-soft-gold);
114124
}
115125
main > aside > nav ul > li {
116126
/* TODO: resolve with vocabulary-theme */
117127
font-size: 1rem;
128+
padding-right: 1em;
118129
}
119130

120131
/* content */
@@ -289,3 +300,13 @@ main > aside > nav ul > li {
289300
display: none;
290301
}
291302
}
303+
304+
@media (max-width: 1028px) {
305+
main {
306+
display: block;
307+
width: 100%;
308+
overflow: hidden;
309+
padding: 0 var(--vocabulary-page-edges-space);
310+
box-sizing: border-box;
311+
}
312+
}

0 commit comments

Comments
 (0)