模板:Mainpage/styles.css
来自星露谷物语扩展百科
更多操作
.mp-wrapper {
--mp-surface-0: var( --color-surface-0 );
--mp-surface-1: var( --color-surface-1 );
--mp-surface-2: var( --color-surface-2 );
--mp-surface-3: var( --color-surface-3, var( --color-surface-2 ) );
--mp-border: var( --border-color-base );
--mp-text: var( --color-emphasized );
--mp-subtle: var( --color-subtle );
--mp-link: var( --color-link );
--mp-progressive: var( --color-progressive );
--mp-progressive-hover: var( --color-progressive--hover );
--mp-progressive-subtle: var( --background-color-progressive-subtle );
--mp-quiet-hover: var( --background-color-button-quiet--hover );
display: flex;
flex-direction: column;
gap: clamp( 12px, 2vw, 20px );
width: 100%;
color: var( --mp-text );
}
.mp-wrapper *,
.mp-wrapper *::before,
.mp-wrapper *::after {
box-sizing: border-box;
}
.mp-wrapper a {
color: var( --mp-link );
}
.mp-wrapper p,
.mp-wrapper ul {
margin-top: 0;
margin-bottom: 0;
}
.mp-wrapper ul {
padding-left: 1.2rem;
}
.mp-title {
margin: 0;
padding: 0 !important;
border: 0;
color: var( --mp-text );
}
.mp-section {
position: relative;
overflow: hidden;
padding: clamp( 16px, 2vw, 24px );
background: linear-gradient( 180deg, var( --mp-surface-1 ), var( --mp-surface-0 ) );
border: 1px solid var( --mp-border );
border-radius: var( --border-radius-large );
box-shadow: var( --box-shadow-border );
}
.mp-section-header {
display: flex;
flex-direction: column;
gap: 6px;
margin-bottom: 16px;
}
.mp-section-header p,
.mp-muted {
color: var( --mp-subtle );
font-size: 0.95rem;
line-height: 1.7;
}
.mp-notice {
padding-block: 14px;
background: linear-gradient( 135deg, var( --mp-progressive-subtle ), var( --mp-surface-1 ) 65% );
}
.mp-notice p {
font-size: var( --font-size-small );
line-height: 1.7;
}
.mp-hero-grid,
.mp-grid {
display: grid;
gap: clamp( 12px, 2vw, 20px );
}
.mp-hero-grid {
grid-template-columns: minmax( 0, 1.65fr ) minmax( 280px, 0.9fr );
align-items: stretch;
}
.mp-hero {
display: grid;
grid-template-columns: minmax( 0, 1.05fr ) minmax( 260px, 0.95fr );
gap: clamp( 16px, 2vw, 24px );
padding: clamp( 18px, 2.4vw, 28px );
background: linear-gradient( 135deg, var( --mp-progressive-subtle ), var( --mp-surface-0 ) 38%, var( --mp-surface-1 ) 100% );
}
.mp-hero__copy,
.mp-side-stack,
.mp-side-card {
display: flex;
flex-direction: column;
gap: 14px;
}
.mp-kicker {
display: inline-flex;
align-items: center;
width: fit-content;
padding: 6px 10px;
background: var( --mp-surface-0 );
border: 1px solid var( --mp-border );
border-radius: 999px;
color: var( --mp-progressive );
font-size: var( --font-size-small );
font-weight: 700;
letter-spacing: 0.02em;
text-transform: uppercase;
}
.mp-hero__title {
font-size: clamp( 2rem, 4vw, 3.2rem );
line-height: 1.05;
}
.mp-hero__lead {
font-size: var( --font-size-x-large );
font-weight: 700;
line-height: 1.5;
}
.mp-hero__text {
color: var( --mp-subtle );
font-size: var( --font-size-large );
line-height: 1.8;
}
.mp-pill-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.mp-pill {
display: inline-flex;
align-items: center;
padding: 7px 12px;
background: var( --mp-surface-0 );
border: 1px solid var( --mp-border );
border-radius: 999px;
color: var( --mp-subtle );
font-size: var( --font-size-small );
}
.mp-stat-grid {
display: grid;
grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
gap: 10px;
}
.mp-stat-card,
.mp-monitor-card {
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 8px;
min-height: 96px;
padding: 14px;
background: linear-gradient( 180deg, var( --mp-surface-0 ), var( --mp-surface-2 ) );
border: 1px solid var( --mp-border );
border-radius: var( --border-radius-medium );
box-shadow: var( --box-shadow-border );
}
.mp-stat-card__value,
.mp-monitor-card__value {
font-size: clamp( 1.35rem, 2.1vw, 1.85rem );
font-weight: 700;
line-height: 1.15;
word-break: break-word;
}
.mp-stat-card__value a,
.mp-monitor-card__value a {
display: block;
text-decoration: none;
}
.mp-stat-card__label,
.mp-monitor-card__label {
color: var( --mp-subtle );
font-size: var( --font-size-small );
}
.mp-monitor-card__value a {
color: var( --mp-progressive ) !important;
}
.mp-button-wrapper {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.mp-hero__actions,
.mp-edit-actions {
display: grid;
grid-template-columns: repeat( auto-fit, minmax( 172px, 1fr ) );
align-items: stretch;
}
.mp-button {
position: relative;
flex: 1 1 160px;
min-width: 0;
background: var( --mp-surface-2 );
border: 1px solid var( --mp-border );
border-radius: var( --border-radius-base );
box-shadow: var( --box-shadow-border );
transition: transform 200ms ease, background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.mp-button:hover {
background: var( --mp-quiet-hover );
transform: translateY( -2px );
}
.mp-wrapper .mp-button > * {
display: flex;
align-items: center;
justify-content: center;
min-height: 52px;
padding: 0 18px !important;
text-align: center;
font-weight: 700;
line-height: 1.35;
}
.mp-wrapper .mp-button span * {
color: var( --mp-text ) !important;
text-decoration: none;
}
.mp-button.mp-button-progressive {
background: linear-gradient( 135deg, var( --mp-progressive-hover ), var( --mp-progressive ) );
border-color: transparent;
box-shadow: var( --box-shadow-medium );
}
.mp-button.mp-button-progressive:hover {
filter: saturate( 1.08 );
}
.mp-wrapper .mp-button.mp-button-progressive span * {
color: var( --color-inverted-primary ) !important;
}
.mp-hero__media {
min-height: clamp( 280px, 32vw, 420px );
aspect-ratio: 16 / 11;
background: var( --mp-surface-2 );
border-radius: calc( var( --border-radius-large ) - 4px );
box-shadow: var( --box-shadow-large );
overflow: hidden;
}
.mp-hero__media > *,
.mp-hero__media > * > * {
display: block;
width: 100%;
height: 100%;
}
.mp-hero__media img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.mp-link-list {
display: grid;
gap: 10px;
margin: 0;
padding: 0;
list-style: none;
}
.mp-link-list li {
margin: 0;
}
.mp-link-list li > a {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
min-height: 52px;
padding: 12px 14px;
background: var( --mp-surface-2 );
border: 1px solid var( --mp-border );
border-radius: var( --border-radius-base );
color: var( --mp-text );
text-decoration: none;
transition: background-color 200ms ease, transform 200ms ease;
}
.mp-link-list li > a::after {
content: "›";
color: var( --mp-progressive );
font-size: 1.2em;
line-height: 1;
}
.mp-link-list li > a:hover,
.mp-chip-link > a:hover {
background: var( --mp-quiet-hover );
transform: translateY( -2px );
}
.mp-icon:hover .mp-icon-link,
.mp-icon:hover .mp-icon-img {
background: var( --mp-quiet-hover );
}
.mp-chip-links {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.mp-chip-link {
display: inline-flex;
}
.mp-chip-link > a {
display: inline-flex;
align-items: center;
min-height: 42px;
padding: 10px 12px;
background: var( --mp-surface-2 );
border: 1px solid var( --mp-border );
border-radius: 999px;
color: var( --mp-text );
text-decoration: none;
transition: background-color 200ms ease, transform 200ms ease;
}
.mp-grid--primary {
grid-template-columns: minmax( 0, 1.12fr ) minmax( 320px, 0.88fr );
}
.mp-grid--support {
grid-template-columns: minmax( 0, 1.18fr ) minmax( 300px, 0.82fr );
grid-template-areas:
"monitor edit"
"monitor about";
align-items: start;
}
.mp-primary-card,
.mp-support-card {
display: flex;
flex-direction: column;
gap: 0;
}
.mp-primary-card .mp-section-header,
.mp-support-card .mp-section-header {
margin-bottom: 18px;
}
.mp-support-card--monitor {
grid-area: monitor;
}
.mp-support-card--edit {
grid-area: edit;
}
.mp-support-card--about {
grid-area: about;
}
.mp-support-card--monitor .mp-monitor-grid {
margin-top: 2px;
}
.mp-support-card--edit .mp-edit-actions {
margin-top: auto;
padding-top: 18px;
}
.mp-support-card--about .mp-mod-icons {
margin-top: 2px;
}
.mp-icon-wrapper {
display: grid;
gap: 12px;
}
.mp-main-icons,
.mp-sub-icons {
grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
}
.mp-mod-icons {
grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
}
.mp-icon {
display: flex;
flex-direction: column;
min-width: 0;
transition: transform 200ms ease;
}
.mp-icon:hover {
transform: translateY( -2px );
}
.mp-icon-img,
.mp-icon-link {
transition: background-color 200ms ease, transform 200ms ease;
}
.mp-icon-img {
display: flex;
align-items: center;
justify-content: center;
min-height: 110px;
padding: 14px;
background: linear-gradient( 180deg, var( --mp-progressive-subtle ), var( --mp-surface-2 ) );
border: 1px solid var( --mp-border );
border-radius: var( --border-radius-large ) var( --border-radius-large ) var( --border-radius-base ) var( --border-radius-base );
box-shadow: var( --box-shadow-border );
}
.mp-icon-img a,
.mp-icon-img span {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
.mp-icon-img img {
width: 56px !important;
height: 56px !important;
max-width: none !important;
object-fit: contain;
filter: drop-shadow( 0 6px 12px rgba( 0, 0, 0, 0.15 ) );
}
.mp-icon-link {
margin-top: -1px;
background: var( --mp-surface-0 );
border: 1px solid var( --mp-border );
border-radius: var( --border-radius-base );
box-shadow: var( --box-shadow-border );
}
.mp-wrapper .mp-icon-link > * {
min-height: 52px;
padding: 10px 10px !important;
line-height: 1.35;
}
.mp-wrapper .mp-icon-link span * {
color: var( --mp-text ) !important;
text-decoration: none;
}
.mp-monitor-grid {
display: grid;
grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
gap: 12px;
}
@media screen and ( max-width: 1200px ) {
.mp-hero-grid,
.mp-grid--primary {
grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
}
.mp-grid--support {
grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
grid-template-areas:
"monitor edit"
"about about";
}
}
@media screen and ( max-width: 980px ) {
.mp-hero-grid,
.mp-hero,
.mp-grid--primary,
.mp-grid--support {
grid-template-columns: 1fr;
}
.mp-grid--support {
grid-template-areas:
"monitor"
"edit"
"about";
}
.mp-main-icons,
.mp-sub-icons {
grid-template-columns: repeat( 4, minmax( 0, 1fr ) );
}
.mp-hero__actions {
grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
}
}
@media screen and ( max-width: 820px ) {
.mp-main-icons,
.mp-sub-icons,
.mp-mod-icons {
grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
}
}
@media screen and ( max-width: 720px ) {
.mp-section {
padding: 16px;
}
.mp-hero__title {
font-size: var( --font-size-xxx-large );
}
.mp-hero__lead {
font-size: var( --font-size-large );
}
.mp-stat-grid,
.mp-monitor-grid {
grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
}
.mp-hero__media {
min-height: 240px;
}
.mp-icon-img {
min-height: 92px;
}
.mp-icon-img img {
width: 44px !important;
height: 44px !important;
}
.mp-wrapper .mp-button > * {
min-height: 48px;
padding: 0 14px !important;
}
.mp-wrapper .mp-icon-link > * {
min-height: 48px;
padding: 9px 8px !important;
}
}
@media screen and ( max-width: 560px ) {
.mp-main-icons,
.mp-sub-icons,
.mp-mod-icons,
.mp-monitor-grid {
grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
}
.mp-hero__actions,
.mp-edit-actions {
grid-template-columns: 1fr;
}
}
@media screen and ( max-width: 480px ) {
.mp-button-wrapper {
flex-direction: column;
}
.mp-button {
flex-basis: auto;
}
}