Toggle menu
Toggle personal menu
Not logged in
Please sign up or log in to edit the wiki.

Module:Navpills/styles.css

From 33 Immortals Wiki
Revision as of 15:32, 15 March 2025 by Admin-shahadat (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
.template-navpills {
    display: flex;
    flex-flow: row wrap;
    gap: var(--space-xs);
    font-size: var(--font-size-small);
    justify-content: space-around;
    text-align: center;
    width: 100%;
}
.template-navpill {
	position: relative;
	width: 100%;
	border: 1px solid var( --border-color-base );
    border-radius: var( --border-radius-medium );
    font-weight: var( --font-weight-medium );
    line-height: var( --line-height-sm );
    overflow: hidden;
    text-align: center;
    height: 150px;
    /* flex: 0 1 calc(20% - 6.4px); */
    flex: 1 1 calc(25% - 8px);
}

/* media queries for the navpill widths */

/* tablets */
@media screen and (max-width: 1119px) {
	.template-navpill {
		flex: 1 1 calc(25% - 8px)
	}
}
/* phones */
@media screen and (max-width: 700px) {
	.template-navpill {
		flex: 1 1 calc(50% - 8px)
	}
}


.template-navpill-background {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

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

.template-navpill-background img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: 500ms;
    transition-property: transform;
    text-align: center;
}

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

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

.template-navpill > a {
	position: relative;
	padding: 0 var( --space-md );
    display: flex;
    align-items: center;
    color: var( --color-emphasized );
    text-align: center;
    text-decoration: none;
	height: 100%;
	width: 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;
	text-align: center !important;
}

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

.template-navpill:active {
    background: var( --background-color-button-quiet--active );
    text-align: center;
}
Cookies help us deliver our services. By using our services, you agree to our use of cookies.