Skip to content

Learn Next.js -- set Right by KABA

Details

AuthorKABA

LicenseNo License

Categorynextjs

Created

Updated

Size2.2 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

As the title says.
Fixed to not display horizontal scroll bar even on narrow screens.

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name         Learn Next.js -- set Right
@version      20241214.01.35
@namespace    https://userstyles.world/user/KABA
@description  As the title says.Fixed to not display horizontal scroll bar even on narrow screens.
@author       KABA
@license      No License
==/UserStyle== */

@-moz-document url-prefix("https://nextjs.org/learn/dashboard-app/") {
/* Navbar */
.relative.z-10.mb-4.h-\[67px\].w-full.max-w-\[1072px\].lg\:-mx-12.lg\:mb-8.style_container__qhZmo {
    width: unset;

    @media (min-width: 1024px) {
        margin-inline: -3rem; /* = 48px */
        max-width: calc(100dvw - 3rem);
    }
}

/* Container */
.relative.mx-auto.max-w-screen-lg.px-4.py-4.md\:py-10 {
    max-width: calc(944px + 176px);

    /* Align content to the right */
    margin-right: unset;

    /* Show container for Adjusting gray back block width */
/*     position: relative;
    &::before, &::after {
        position: absolute; top: 0;

        border: solid 9px #f002;
        height: 100%;
        content: "";

        @media (min-width: 768px) { border-width: 7px }
        @media (min-width: 1024px) { border-width: 11px }
    }
    &::before { left: 0 }
    &::after { right: 0 } */

    @media (min-width: 1024px) { padding-inline: 4rem /* 64 */ }
}

/* Expanded gray block */
.bg-vercel-200.md\:-mx-\[62px\],
/* TOC */
.md\:bg-vercel-200.md\:mx-\[-64px\] {
    width: unset;

    /* Block: Reveal the solution */
    /* &.-mx-5 {} */

    /* Block: It’s time to take a quiz! */
    /* .md\:px-\[62px\] {} */

    @media (768px <= width < 1024px) {
        --px: 1.5rem; /* 32px */
        margin-inline: calc(var(--px) * -1);
        padding-inline: var(--px);
    }
}
}

@-moz-document url-prefix("https://nextjs.org/blog/") {
/* Blog */

/* Wrapper */
.relative.mx-auto.max-w-screen-xl.gap-x-6.px-4.py-10.md\:flex.md\:flex-row.md\:py-10 {
    --px: min(18vw / 360 * 100, 2.5rem);

    column-gap: 0;
    padding-inline: var(--px);

    /* Container */
    [class*=detail_root] {
        [class*=code-block_pre] {
            --border-width: 1px;
            max-width: calc(100dvw - (var(--px) + var(--border-width)) * 2);
        }
    }
}
}

Reviews

No reviews yet.