Fix #1 : Better CSS

This commit is contained in:
Alexis Hassler
2019-05-04 18:37:29 +02:00
parent 460d7e3ef4
commit be7a29f8ae
17 changed files with 310 additions and 669 deletions

18
_sass/content.scss Normal file
View File

@@ -0,0 +1,18 @@
.center {
width: 100%;
text-align: center;
}
div.floatleft {
float: left;
clear: left;
position: relative;
margin: 0 .5em .5em 0;
border: 0;
}
div.floatright {
float: right;
clear: right;
position: relative;
margin: 0 .5em .5em 0;
border: 0;
}

29
_sass/footer.scss Normal file
View File

@@ -0,0 +1,29 @@
body > footer {
background: #ffffff;
grid-column: 1 / 3;
grid-row: 2;
}
footer {
display: grid;
grid-template-columns: 20% 60% 20%;
#footer-center {
align-self: center;
justify-self: center;
text-align: center;
font-size: 80%;
}
#footer-right {
align-self: center;
justify-self: end;
a {
background-image: url(https://creativecommons.org/images/public/somerights20.png);
width: 88px;
height: 31px;
display: block;
background-repeat: no-repeat;
}
}
}

57
_sass/grid.scss Normal file
View File

@@ -0,0 +1,57 @@
body {
display: grid;
grid-template-columns: 250px auto;
grid-template-rows: auto auto;
grid-gap: 10px;
#menu {
grid-column: 1;
grid-row: 1;
}
#main {
grid-column: 2;
grid-row: 1;
min-width: 0;
}
}
@media (max-width: 700px) {
body {
grid-template-columns: auto;
#main {
grid-column: 1;
grid-row: 1;
min-width: 0;
}
#menu {
grid-column: 1;
grid-row: 2;
#logo {
position: absolute;
right: 20px;
a {
height: 60px;
width: 150px;
margin-top: 60px;
}
}
}
footer {
grid-column: 1;
grid-row: 3;
display: none;
}
}
}
@media (max-width: 350px) {
#logo {
display: none;
}
}

View File

@@ -1,539 +1,122 @@
body {
font: x-small sans-serif;
font-family: sans-serif;
background: #acabab;
color: black;
margin: 0;
padding: 0;
direction: ltr;
unicode-bidi: embed;
}
#main {
background: #ffffff;
padding: 1em;
}
#menu {
#logo {
a {
display: block;
height: 155px;
width: 100%;
background-repeat: no-repeat;
background-position: 35% 50% !important;
text-decoration: none;
}
}
.portlet {
display: grid;
font-size: 90%;
ul.section-nav, // toc has no portlet-body
.portlet-body {
background: #ffffff;
border: 1px solid #aaa;
grid-row: 2;
}
h3 {
font-size: 90%;
font-weight: normal;
margin: 1em 0 0 0;
padding-left: 0.3em;
grid-row: 1;
}
ul:empty,
ul:empty ~ h3 {
display: none;
height: 0;
margin: 0;
overflow: hidden;
grid-row: 2;
}
}
}
h1, h2, h3, h4, h5, h6 {
border-bottom: 1px solid #aaa;
margin: 0 0 0.5em 0;
font-weight: normal;
}
a {
text-decoration: none;
color: #0645ad;
background: none;
&:visited {
color: #0b0080;
}
&:active {
color: #faa700;
}
&:hover, &:focus {
text-decoration: underline;
}
&.stub {
color: #772233;
}
&.new {
color: #ba0000;
}
}
#p-personal a.new {
color: #ba0000;
}
a.new:visited {
color: #a55858;
}
.wiki-body a.external {
color: #36b;
&:visited {
color: #636;
}
&:active {
color: #b63;
}
}
img {
border: none;
vertical-align: middle;
}
hr {
height: 1px;
color: #aaa;
background-color: #aaa;
border: 0;
margin: 0.2em 0;
}
h1, h2, h3, h4, h5, h6 {
color: black;
background: none;
font-weight: normal;
margin: 0;
overflow: hidden;
padding-top: .5em;
padding-bottom: .17em;
border-bottom: 1px solid #aaa;
}
h1 {
font-size: 188%;
}
h2 {
font-size: 150%;
}
h3, h4, h5, h6 {
border-bottom: none;
#title {
font-weight: bold;
}
h3 {
font-size: 132%;
}
h4 {
font-size: 116%;
}
h5 {
font-size: 108%;
}
h6 {
font-size: 100%;
}
h1, h2 {
margin-bottom: 0.6em;
}
h3, h4, h5 {
margin-bottom: 0.3em;
}
p {
margin: .4em 0 .5em 0;
line-height: 1.5em;
img {
margin: 0;
}
}
ul {
line-height: 1.5em;
list-style-type: square;
margin: .3em 0 0 1.6em;
padding: 0;
}
ol {
line-height: 1.5em;
margin: .3em 0 0 3.2em;
padding: 0;
list-style-image: none;
}
li {
margin-bottom: 0.1em;
}
dt {
font-weight: bold;
margin-bottom: 0.1em;
}
dl {
margin-top: .2em;
font-size: 210%;
margin-bottom: 0.5em;
}
dd {
line-height: 1.5em;
margin-left: 1.6em;
margin-bottom: 0.1em;
}
pre, code {
font-family: monospace;
font-size: 0.9rem;
q {
font-style: italic;
}
pre, code, tt, kbd, samp {
font-family: monospace, Courier;
}
code {
color: black;
padding: 1px 4px;
span {
border: 0;
a {
color: #5a5a5a;
}
}
pre {
color: black;
background-color: #f9f9f9;
border: 1px solid #ddd;
padding: 1em;
}
table {
font-size: 100%;
}
fieldset {
border: 1px solid #2f6fab;
margin: 1em 0 1em 0;
padding: 0 1em 1em;
line-height: 1.5em;
&.nested {
margin: 0 0 0.5em 0;
padding: 0 0.5em 0.5em;
}
}
legend {
padding: .5em;
font-size: 95%;
}
form {
border: none;
margin: 0;
}
textarea {
width: 100%;
padding: .1em;
display: block;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
select {
vertical-align: top;
// white-space: pre-wrap;
// word-wrap: break-word;
overflow: auto;
}
.center {
width: 100%;
text-align: center;
}
*.center * {
margin-left: auto;
margin-right: auto;
img, embed, object, video {
max-width: 100%;
height: auto;
}
.small {
font-size: 94%;
}
table.small {
font-size: 100%;
}
.visualClear {
clear: both;
}
div.floatright, table.floatright {
margin: 0 0 .5em .5em;
border: 0;
}
div {
&.floatright p {
font-style: italic;
}
&.floatleft {
margin: 0 .5em .5em 0;
border: 0;
}
}
table.floatleft {
margin: 0 .5em .5em 0;
border: 0;
}
div {
&.floatleft p {
font-style: italic;
}
&.thumb {
margin-bottom: .5em;
width: auto;
background-color: transparent;
}
&.thumbinner {
border: 1px solid #ccc;
padding: 3px;
background-color: #f9f9f9;
font-size: 94%;
text-align: center;
overflow: hidden;
}
}
html {
.thumbimage {
border: 1px solid #ccc;
}
.thumbcaption {
border: none;
line-height: 1.4em;
padding: 3px;
font-size: 94%;
text-align: left;
}
}
img.thumbborder {
border: 1px solid #dddddd;
}
div {
&.tright {
margin: 0.5em 0 1.3em 1.4em;
}
&.tleft {
margin: 0.5em 1.4em 1.3em 0;
}
}
.catlinks {
border: 1px solid #aaa;
background-color: #f9f9f9;
padding: 5px;
margin-top: 1em;
clear: both;
}
.usermessage {
background-color: #ffce7b;
border: 1px solid #ffa500;
color: black;
font-weight: bold;
margin: 2em 0 1em;
padding: .5em 1em;
vertical-align: middle;
}
#siteNotice {
position: relative;
text-align: center;
margin: 0;
}
#localNotice {
margin-bottom: 0.9em;
}
.firstHeading {
margin-bottom: .1em;
line-height: 1.2em;
padding-bottom: 0;
}
#siteSub {
display: none;
}
#jump-to-nav {
margin-top: -1.4em;
margin-bottom: 1.4em;
}
#contentSub, #contentSub2 {
font-size: 84%;
line-height: 1.2em;
margin: 0 0 1.4em 1em;
color: #545454;
width: auto;
}
span.subpages {
display: block;
}
div#column-content {
.columns {
-webkit-columns: 3;
-moz-columns: 3;
columns: 3;
width: 100%;
float: right;
margin: 0 0 .6em -15em;
padding: 0;
}
.wiki-body {
margin: 1em 0 0 15em;
padding: 1em;
position: relative;
z-index: 2;
background: white;
color: black;
border: 1px solid #aaa;
border-right: none;
line-height: 1.5em;
}
div#column-one {
padding-top: 160px;
}
#column-one h2 {
position: absolute;
top: -9999px;
}
div#globalWrapper {
font-size: 127%;
width: 100%;
margin: 0;
padding: 0;
}
a {
color: #002bb8;
&:visited {
color: #5a3696;
}
&.new {
color: #cc2200;
}
}
#p-personal a.new {
color: #cc2200;
}
ul {
list-style-type: square;
list-style-image: url(data:image/gif;base64,R0lGODlhBQANAIAAAGOMnP///yH5BAEAAAEALAAAAAAFAA0AAAIJjI+pu+APo4SpADs=);
}
pre {
line-height: 1.1em;
}
#firstHeading {
padding-top: 0;
font-size: 210%;
font-weight: bold;
}
.portlet {
border: none;
margin: 0 0 .5em;
padding: 0;
float: none;
width: 16.5em;
overflow: hidden;
h3 {
background: transparent;
padding: 0 1em 0 .5em;
display: inline;
height: 1em;
/* text-transform:lowercase; */
font-size: 91%;
font-weight: normal;
white-space: nowrap;
}
}
.portlet-body {
font-size: 95%;
background-color: white;
color: black;
border-collapse: collapse;
border: 1px solid #aaa;
padding: 0 0.8em 0.3em 0.5em;
&:after {
content: '';
clear: both;
display: block;
}
}
.portlet {
ul {
line-height: 1.5em;
font-size: 95%;
}
li {
padding: 0;
margin: 0;
}
}
#p-logo {
top: 10px;
left: 10px;
position: absolute;
z-index: 3;
height: 155px;
width: 12em;
overflow: visible;
a {
display: block;
height: 155px;
width: 15em;
background-repeat: no-repeat;
background-position: 35% 50% !important;
text-decoration: none;
&:hover {
display: block;
height: 155px;
width: 15em;
background-repeat: no-repeat;
background-position: 35% 50% !important;
text-decoration: none;
}
}
ul {
line-height: 1.5em;
font-size: 95%;
list-style-type: square;
list-style-image: url(data:image/gif;base64,R0lGODlhBQANAIAAAGOMnP///yH5BAEAAAEALAAAAAAFAA0AAAIJjI+pu+APo4SpADs=);
padding: .3em 0 0 1.5em;
margin: 0;
}
div#footer {
background-color: white;
border-top: 1px solid #fabd23;
border-bottom: 1px solid #fabd23;
margin: .6em 0 1em 0;
overflow: hidden;
padding: .4em 0 .3em 0;
text-align: center;
font-size: 90%;
ul {
list-style-type: none;
list-style-image: unset;
}
li {
display: inline;
margin: 0 1.3em;
}
}
#column-one {
font-size: 14px;
}
#column-content {
font-size: 16px;
}
ul#f-list {
float: left;
width: 100%;
}
.floatleft {
float: left;
clear: left;
}
.floatright {
float: right;
clear: right;
}
#f-poweredbyico {
margin:0 8px;
position:relative;
top:-2px;
float:right;
height:1%;
li {
padding: 0;
margin: 0;
}