All Projects → tomhodgins → Element Queries Spec

tomhodgins / Element Queries Spec

A spec for a Container-Style Element Query Syntax

Projects that are alternatives of or similar to Element Queries Spec

Container Query
A PostCSS plugin and Javascript runtime combination, which allows you to write container queries in your CSS the same way you would write media queries.
Stars: ✭ 119 (-68.27%)
Mutual labels:  query, module, component, responsive
Daggraph
Dagger dependency graph generator for Android Developers
Stars: ✭ 1,140 (+204%)
Mutual labels:  module, component
Jcnavigator
A decoupled navigator framework of jumping between modules or apps for iOS development.
Stars: ✭ 33 (-91.2%)
Mutual labels:  module, component
Axe
a modular architecture to separate code, compilation, running, testing of each module
Stars: ✭ 252 (-32.8%)
Mutual labels:  module, component
Element Patch
An extension package based on vue and element-ui. 一个基于 vue 与 element-ui 的扩展包,提供数据驱动的表单渲染,菜单渲染,表格拖拽,权限控制等功能
Stars: ✭ 187 (-50.13%)
Mutual labels:  component, element
Component Size
React hook for determining the size of a component
Stars: ✭ 224 (-40.27%)
Mutual labels:  component, element
Brouter
Stars: ✭ 198 (-47.2%)
Mutual labels:  module, component
Requirejs Demo
《RequreJS学习笔记》
Stars: ✭ 164 (-56.27%)
Mutual labels:  module, component
Mq Scss
Extremely powerful Sass media query mixin. Allows you to create almost any media query you can imagine.
Stars: ✭ 122 (-67.47%)
Mutual labels:  query, responsive
Git-API
Gets info from github and transfers into json styled data
Stars: ✭ 18 (-95.2%)
Mutual labels:  query, module
Vue Breakpoints
🍬 🙈 Vue.js utility component to show and hide components based on breakpoints
Stars: ✭ 179 (-52.27%)
Mutual labels:  component, responsive
React Modern Library Boilerplate
Boilerplate for publishing modern React modules with Rollup
Stars: ✭ 285 (-24%)
Mutual labels:  module, component
Made With Love
🚀 An experimental project which demonstrates an Angular Package which contains Angular Elements and Schematics
Stars: ✭ 67 (-82.13%)
Mutual labels:  component, element
React Native Scalable Image
React Native Image component which scales width or height automatically to keep the original aspect ratio
Stars: ✭ 241 (-35.73%)
Mutual labels:  component, responsive
React Native Fit Image
Responsive image component to fit perfectly itself.
Stars: ✭ 539 (+43.73%)
Mutual labels:  component, responsive
Geotic
Entity Component System library for javascript
Stars: ✭ 97 (-74.13%)
Mutual labels:  query, component
ci4-album
🔥 CodeIgniter 4 example Album module uses Domain Driven Design Architecture with Tactical Pattern
Stars: ✭ 67 (-82.13%)
Mutual labels:  query, module
React Querybuilder
A QueryBuilder component for React
Stars: ✭ 315 (-16%)
Mutual labels:  query, component
Jigsaw
Jigsaw七巧板 provides a set of web components based on Angular5/8/9+. The main purpose of Jigsaw is to help the application developers to construct complex & intensive interacting & user friendly web pages. Jigsaw is supporting the development of all applications of Big Data Product of ZTE.
Stars: ✭ 354 (-5.6%)
Mutual labels:  component
Responsive Bootstrap Toolkit
Responsive Bootstrap Toolkit allows for easy breakpoint detection in JavaScript
Stars: ✭ 364 (-2.93%)
Mutual labels:  responsive

CSS Element Queries

CSS Standard Status

A spec for a container-style element query syntax in CSS

Read online: element-queries.html

What is this about?

This spec aims to define a syntax for scoped styles and element queries in a container query style, as well as the related selectors, functions, and units that make scoped styles and element queries versatile and powerful way to write layout-independent responsive conditions for elements in CSS.

Proposed Syntax

/* Scoped Style */
@element div {
  :self {
    background: lime;
  }
}

/* Element Query */
@element div and (min-width: 500px) {
  :self {
    background: lime;
  }
}

/* Container Query */
@element div and (min-width: 500px) {
  :self {
    background: lime;
  }
  html {
    background: red;
  }
}

/* Multiple Selectors */
@element #example-1, #example-2 {
  :self {
    background: lime;
  }
}

/* Multiple Conditions */
@element div and (min-width: 500px) and (min-characters: 5) {
  :self {
    background: lime;
  }
}

View Syntax Example: styles.css

Plugin & Demo

As a reference for the syntax described in the spec, I have included a JavaScript plugin that reads the proposed syntax and displays the desired behaviour of the proposed functionality.

View Plugin: element-queries.js

View Demo: demo.html

Related Projects

There are a few projects currently working with the syntax described in this spec:

Further Examples

More examples of this syntax can be found on Codepen by searching for "EQCSS".

Search Codepen for EQCSS: Codepen Search

Who am I?

I'm an independent web developer, not affiliated with any major companies. The research & development contained in this spec is my own.

How you can help

At this stage the work on this spec is focused on taking the existing EQCSS syntax for element queries as implemented by the EQCSS project and defining them in a more formal way so that other plugin builders could design plugins or tools that work with the EQCSS syntax as implemented by EQCSS.js

In the future once the first version of this document is complete, there will be an opportunity to extend the features described.

For now, the most productive way to provide input would be by contributing to the conversation in the Gitter chat room for the EQCSS project

Further Reading

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].