User:盐棋/Sandbox.css:修订间差异
小 (初步css) |
小 (修复样式,todo:竖直居中、等级NS、labeltext间距、datecov不换行、figure未填充) |
||
第1行: | 第1行: | ||
.infotable { | .infotable { | ||
max-width: 100%; | |||
display: grid; | display: grid; | ||
grid-template-columns: | grid-template-columns: auto min-content; | ||
margin: 1em 0 2em; | |||
font-size: small; | |||
line-height: 1.5em; | |||
text-align: center; | text-align: center; | ||
background-color: #f8f8f8; | |||
overflow: auto hidden; | |||
position: relative; | |||
} | } | ||
. | .infotable, | ||
. | .infotable>*, | ||
. | .infotable .main>* { | ||
outline: 1px solid #eee; | |||
box-sizing: border-box; | box-sizing: border-box; | ||
overflow-wrap: break-word; | |||
} | } | ||
第24行: | 第29行: | ||
} | } | ||
@media (max-width: | @media (max-width: 720px) { | ||
.infotable { | .infotable { | ||
grid-template-areas: | grid-template-areas: | ||
第31行: | 第36行: | ||
"main"; | "main"; | ||
} | } | ||
} | |||
.header, | |||
.figure, | |||
.main>* { | |||
padding: 5px 5px; | |||
} | } | ||
第36行: | 第47行: | ||
.header { | .header { | ||
grid-area: header; | grid-area: header; | ||
font-size: large; | |||
height: auto !important; | |||
} | } | ||
第46行: | 第59行: | ||
.figure { | .figure { | ||
grid-area: figure; | grid-area: figure; | ||
justify-self: center; | |||
align-self: center; | |||
} | } | ||
span.bg-c { | |||
padding: 1px 5px 1px 5px; | |||
margin: 0 5px 0 5px; | |||
} | |||
.infotable.light .bg-c { | .infotable.light .bg-c { |
2024年3月13日 (三) 01:30的版本
.infotable {
max-width: 100%;
display: grid;
grid-template-columns: auto min-content;
margin: 1em 0 2em;
font-size: small;
line-height: 1.5em;
text-align: center;
background-color: #f8f8f8;
overflow: auto hidden;
position: relative;
}
.infotable,
.infotable>*,
.infotable .main>* {
outline: 1px solid #eee;
box-sizing: border-box;
overflow-wrap: break-word;
}
/* 媒体查询 */
@media (min-width: 720px) {
.infotable {
grid-template-areas:
"header header"
"main figure";
}
}
@media (max-width: 720px) {
.infotable {
grid-template-areas:
"header"
"figure"
"main";
}
}
.header,
.figure,
.main>* {
padding: 5px 5px;
}
/* 设置 grid area */
.header {
grid-area: header;
font-size: large;
height: auto !important;
}
.main {
grid-area: main;
display: grid;
grid-template-columns: 1fr repeat(3, 2fr);
}
.figure {
grid-area: figure;
justify-self: center;
align-self: center;
}
span.bg-c {
padding: 1px 5px 1px 5px;
margin: 0 5px 0 5px;
}
.infotable.light .bg-c {
background-color: lightskyblue;
}
.infotable.conflict .bg-c {
background-color: #b99afd;
}
.infotable.colorless .bg-c {
background-color: #f4d2f8;
}
.gc-1 {
grid-column: 1/-1;
}
.gc-2 {
grid-column: 2/-1;
}
.span-2 {
grid-column: span 2;
}
.span-3 {
grid-column: span 3;
}
.span-4 {
grid-column: span 4;
}
.span-5 {
grid-column: span 5;
}