Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Navpills/styles.css: Difference between revisions

From AoM Retold
Content deleted Content added
Created page with ".template-navpills { display: grid; gap: 1%; grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) ); grid-auto-rows: 3rem; font-size: small; } .template-navpill { position: relative; border: 1px solid yellow; border-radius: 1rem; font-weight: bold; line-height: 1; overflow: hidden; } .template-navpill-background { position: absolute; } .template-navpill-background:after { content: ''; position: absolute;..."
 
No edit summary
Line 1: Line 1:
.template-navpills {
.template-navpills {
display: grid;
display: grid;
gap: 1%;
gap: 0.5rem;
grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) );
grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) );
grid-auto-rows: 3rem;
grid-auto-rows: 3rem;
font-size: small;
font-size: 0.875rem;
}
}


.template-navpill {
.template-navpill {
position: relative;
position: relative;
border: 1px solid yellow;
border: 1px solid rgba( 0, 0, 0, 0.08 );
border-radius: 1rem;
border-radius: 8px;
font-weight: bold;
font-weight: 500;
line-height: 1;
line-height: 1.375rem;
overflow: hidden;
overflow: hidden;
}
}
Line 18: Line 18:
.template-navpill-background {
.template-navpill-background {
position: absolute;
position: absolute;
}
}


Line 25: Line 23:
content: '';
content: '';
position: absolute;
position: absolute;
background: linear-gradient(to right, #000, transparent);
background: linear-gradient(to right, #000, transparent);
transition: transform 250ms ease;
transition: transform 250ms ease;
Line 34: Line 31:
height: 100%;
height: 100%;
object-fit: cover;
object-fit: cover;
transition: smooth;
transition: 150ms cubic-bezier( 0.215, 0.61, 0.355, 1 );
transition-property: transform;
transition-property: transform;
}
}
Line 48: Line 45:
.template-navpill > a {
.template-navpill > a {
position: relative;
position: relative;
padding: 0 ;
padding: 0 1rem;
display: flex;
display: flex;
align-items: center;
align-items: center;
color: blue;
color: var( --color-emphasized );
text-decoration: none;
text-decoration: none;
height: 100%;
height: 100%;

Revision as of 16:35, 29 September 2024

.template-navpills {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat( auto-fill, minmax( 160px, 1fr ) );
    grid-auto-rows: 3rem;
    font-size: 0.875rem;
}

.template-navpill {
	position: relative;
	border: 1px solid rgba( 0, 0, 0, 0.08 );
    border-radius: 8px;
    font-weight: 500;
    line-height: 1.375rem;
    overflow: hidden;
}

.template-navpill-background {
	position: absolute;
}

.template-navpill-background:after {
	content: '';
    position: absolute;
    background: linear-gradient(to right, #000, transparent);
    transition: transform 250ms ease;
}

.template-navpill-background img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: 150ms cubic-bezier( 0.215, 0.61, 0.355, 1 );
    transition-property: transform;
}

.template-navpill:hover .template-navpill-background::after {
    transform: translateX( -100% );
}

.template-navpill:hover .template-navpill-background img {
	transform: scale( 1.1 );
}

.template-navpill > a {
	position: relative;
	padding: 0 1rem;
    display: flex;
    align-items: center;
    color: var( --color-emphasized );
    text-decoration: none;
	height: 100%;
}

.template-navpill > .template-navpill-background + a {
	color: #fff;
	text-shadow: -1px 0 .2em #000, 0 1px .2em #000, 1px 0 .2em #000, 0 -1px .2em #000;
}

.template-navpill:hover {
    background: var( --background-color-button-quiet--hover );
}

.template-navpill:active {
    background: var( --background-color-button-quiet--active );
}
Cookies help us deliver our services. By using our services, you agree to our use of cookies. We only use cookie to make the site function and save your preferences, nothing else.