awesome-repositories.com
Blog
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
marcj avatar

marcj/css-element-queries

0
View on GitHub↗
4,243 stars·478 forks·JavaScript·MIT·1 vuemarcj.github.io/css-element-queries↗

Css Element Queries

Ce projet est une bibliothèque CSS responsive et un moniteur de dimensions d'éléments. Il fournit un polyfill pour les requêtes de conteneur CSS, permettant aux styles d'être appliqués en fonction des dimensions spécifiques d'un élément dans des environnements où le support natif du navigateur est indisponible.

La bibliothèque surveille la largeur et la hauteur des éléments DOM cibles en temps réel, déclenchant des rappels personnalisés chaque fois que les dimensions changent. Elle adapte les composants d'UI en exécutant des ajustements de mise en page et des changements de style basés sur des seuils de taille prédéfinis plutôt que sur la taille globale de la fenêtre du navigateur.

L'outil gère ces adaptations via plusieurs mécanismes, incluant l'injection de variables CSS dynamiques, le basculement de classes basé sur des seuils et l'utilisation de l'API ResizeObserver pour synchroniser les dimensions des éléments avec les feuilles de style.

Features

  • Container Queries - Implements size-based styling logic for elements, providing a polyfill for CSS container queries.
  • Dynamic Component Layouts - Automatically adjusts the appearance of UI components as their containing space expands or shrinks.
  • Element Resize Callbacks - Executes custom callback functions immediately whenever the dimensions of a target element change.
  • ResizeObserver Integrations - Uses the ResizeObserver API to watch for changes in element dimensions and trigger style updates.
  • Container Query Polyfills - Provides a polyfill for applying styles based on element dimensions in browsers lacking native container query support.
  • Container-Relative Styling - Applies different CSS rules based on the size of a specific element rather than the browser window.
  • CSS Custom Property Injections - Calculates element sizes and injects them as CSS custom properties for use in style sheets.
  • Element Dimension Tracking - Monitors the width and height of specific HTML elements and triggers updates when they change.
  • Geometric State Mappings - Binds specific CSS rules to the real-time geometric state of target DOM elements.
  • Threshold-Based Styling - Allows CSS rules to change automatically when an element reaches defined width or height thresholds.
  • State-Driven Callbacks - Executes user-defined JavaScript functions when element dimensions cross specific size thresholds.
  • Responsive Layout Adapters - Ships a set of styles and logic for fluid layouts that adapt to parent container sizes.
  • CSS Class-Based Styling - Toggles specific CSS classes when an element crosses predefined width or height boundaries.

Historique des stars

Graphique de l'historique des stars pour marcj/css-element-queriesGraphique de l'historique des stars pour marcj/css-element-queries

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Questions fréquentes

Que fait marcj/css-element-queries ?

Ce projet est une bibliothèque CSS responsive et un moniteur de dimensions d'éléments. Il fournit un polyfill pour les requêtes de conteneur CSS, permettant aux styles d'être appliqués en fonction des dimensions spécifiques d'un élément dans des environnements où le support natif du navigateur est indisponible.

Quelles sont les fonctionnalités principales de marcj/css-element-queries ?

Les fonctionnalités principales de marcj/css-element-queries sont : Container Queries, Dynamic Component Layouts, Element Resize Callbacks, ResizeObserver Integrations, Container Query Polyfills, Container-Relative Styling, CSS Custom Property Injections, Element Dimension Tracking.

Quelles sont les alternatives open-source à marcj/css-element-queries ?

Les alternatives open-source à marcj/css-element-queries incluent : jackmoore/autosize — autosize is a client-side JavaScript utility that automatically adjusts the height of HTML textarea elements to fit… sbstjn/timesheet.js — timesheet.js is a JavaScript library for rendering time-series data and event lists as responsive HTML and CSS… ripple-ts/ripple — Ripple is a full-stack TypeScript web framework and reactive UI library used for building interfaces with server-side… cewendel/swtableviewcell — SWTableViewCell is a UIKit component and library for adding interactive swipe-to-reveal action buttons to table view… benhowdle89/grade — Grade is a JavaScript library for image color analysis and dynamic theme generation. It extracts the most prominent… jekip/naive-ui-admin — Naive UI Admin is a Vue 3 admin dashboard framework built with TypeScript, Vite, and the Naive UI component library.…

Alternatives open source à Css Element Queries

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Css Element Queries.
  • jackmoore/autosizeAvatar de jackmoore

    jackmoore/autosize

    5,092Voir sur GitHub↗

    autosize is a client-side JavaScript utility that automatically adjusts the height of HTML textarea elements to fit their text content. It functions as a DOM layout tool designed to manage the dimensions and scrolling behavior of input fields in real time. The utility handles dynamic resizing during user typing and window resize events. It supports height constraints by comparing calculated dimensions against CSS minimum and maximum properties to restore overflow scrolling when limits are reached. The tool provides capabilities to monitor resize events, manually trigger layout refreshes for

    JavaScript
    Voir sur GitHub↗5,092
  • sbstjn/timesheet.jsAvatar de sbstjn

    sbstjn/timesheet.js

    6,979Voir sur GitHub↗

    timesheet.js is a JavaScript library for rendering time-series data and event lists as responsive HTML and CSS timelines. It serves as a date-based event renderer that converts lists of dated activities into visual chronologies, supporting the creation of web-based timesheets and activity logs. The library provides components for generating visual timelines, time-tracking tables, and project scheduling displays. It transforms raw event data—including start dates, end dates, descriptions, and categories—into structured HTML interfaces that adapt to different screen sizes.

    JavaScript
    Voir sur GitHub↗6,979
  • ripple-ts/rippleAvatar de Ripple-TS

    Ripple-TS/ripple

    7,379Voir sur GitHub↗

    Ripple is a full-stack TypeScript web framework and reactive UI library used for building interfaces with server-side rendering. It organizes user interfaces into a hierarchy of reusable, scoped components with built-in state management and client-side hydration. The framework is distinguished by its fine-grained reactivity, which updates specific DOM elements without requiring full component re-renders. It integrates server-side logic and client-side components within a single TypeScript codebase, enabling a unified full-stack development workflow. The system covers a broad range of capabil

    JavaScript
    Voir sur GitHub↗7,379
  • benhowdle89/gradeAvatar de benhowdle89

    benhowdle89/grade

    3,761Voir sur GitHub↗

    Grade is a JavaScript library for image color analysis and dynamic theme generation. It extracts the most prominent colors from an image to automatically generate complementary CSS gradients and coordinated color palettes for web interfaces. The tool identifies dominant colors using pixel-data analysis and applies mathematical offsets to determine matching hues. It can inject these calculated values directly into the document as CSS custom properties or export the gradient data as a raw array for custom visual implementation.

    JavaScript
    Voir sur GitHub↗3,761
  • Voir les 30 alternatives à Css Element Queries→