Sidebar2 - Allow custom height or CSS variable for .nav-scrollable element

Abierto
#1,158 0 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
html
Área
frontend

Línea de trabajo

Start by locating the Sidebar2 component and the scoped CSS that sets .nav-scrollable height inside the min-width: 641px media query. Compare how the component exposes other styling options and choose a supported way to let consumers control or disable that height. Done means the fixed height can be adapted for layouts with a footer and the change is covered by relevant component tests or documentation.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area-sidebar-2 enhancement

Problem

Currently, the Sidebar2 component renders a scrollable content area (.nav-scrollable) with a hardcoded height defined via scoped CSS:

@media (min-width: 641px) {
    .nav-scrollable[b-xxxxxxx] {
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}

This prevents consumers from overriding the height or using a custom layout with a footer, as the height gets reapplied after window resizing due to media queries or re-rendering.

Expected Behavior
As a library consumer, I would like to:

Override the scrollable content height via a CSS variable (e.g. --bb-sidebar-content-height)

Or pass a parameter like ContentHeight to the Sidebar2 component

Or have the ability to disable internal height styling entirely and manage layout externally

Why This Matters
When using a layout with a fixed footer, the hardcoded height causes the last few sidebar items to be hidden behind the footer, especially on smaller screen heights. Using global CSS or inline styles doesn't work due to scoped CSS and internal media queries.

Proposed Solution
Add support for one of the following:

A CSS variable like --bb-sidebar-content-height used in the scoped style

A ContentHeight parameter on the Sidebar2 component

An option to disable or override internal height behavior (similar to class or style passthrough)

This would make Sidebar2 much easier to integrate into complex layouts without resorting to JavaScript interop hacks.

Thank You!
Thanks for the great component library — this is the only issue I’ve had while integrating Sidebar2 into a real-world layout.
Lenguaje dominante
HTML
Estrellas
1.2k
Forks
111
Merge medio
4 min
PR fusionados (30 d)
55

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de vikramlearning/blazorbootstrap

Todos los issues de vikramlearning/blazorbootstrap

Issues similares

Más issues de Web Dev

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.