All Projects โ†’ dbox โ†’ caesura

dbox / caesura

Licence: other
๐Ÿ“ A reasonable breakpoint scale using @Custom-Media

Programming Languages

CSS
56736 projects

Projects that are alternatives of or similar to caesura

vite-postcss-preset-env
vite-cssnext.netlify.app/
Stars: โœญ 35 (+150%)
Mutual labels:  postcss, cssnext
postcss-sort-media-queries
PostCSS plugin for combine and sort CSS media queries with mobile first or desktop first methods.
Stars: โœญ 118 (+742.86%)
Mutual labels:  postcss, mediaquery
Postcss Cssnext
`postcss-cssnext` has been deprecated in favor of `postcss-preset-env`.
Stars: โœญ 5,388 (+38385.71%)
Mutual labels:  postcss, cssnext
stencil-boilerplate
A Stencil app boilerplate including routing, Redux etc.
Stars: โœญ 51 (+264.29%)
Mutual labels:  postcss, cssnext
Mobi.css
A lightweight, scalable, mobile-first CSS framework
Stars: โœญ 2,348 (+16671.43%)
Mutual labels:  postcss, cssnext
react-context-responsive
A package that provides a responsive context to your application, using React Context API.
Stars: โœญ 25 (+78.57%)
Mutual labels:  mediaquery, mediaqueries
Bootstrap4-RTL
๐Ÿ…ฑ An Awesome RTL bootstrap 4 with gulp and postcss
Stars: โœญ 89 (+535.71%)
Mutual labels:  postcss
webpack-typescript-react
Webpack 5 boilerplate with support of most common loaders and modules (see tags and description)
Stars: โœญ 185 (+1221.43%)
Mutual labels:  postcss
fortune
๐Ÿ”ฎFortune is your friendly CSS properties framework.
Stars: โœญ 16 (+14.29%)
Mutual labels:  postcss
postcss-bidirection
PostCSS plugin that polyfill Bi-directional CSS properties and values to suppot rtl and ltr rules in all browsers
Stars: โœญ 24 (+71.43%)
Mutual labels:  postcss
stencil-tailwind-plugin
Plugin for using tailwindcss with StencilJS
Stars: โœญ 17 (+21.43%)
Mutual labels:  postcss
electron-vue-boilerplate
Simple boilerplate for building Vue app with Electron and Webpack.
Stars: โœญ 53 (+278.57%)
Mutual labels:  postcss
postcss-define-function
PostCSS plugin for Sass-like function directive
Stars: โœญ 25 (+78.57%)
Mutual labels:  postcss
react-cli
ๅŸบไบŽ create-react-app ๆญๅปบ็š„ๅ‰็ซฏ่„šๆ‰‹ๆžถ
Stars: โœญ 18 (+28.57%)
Mutual labels:  postcss
postcss-clean
PostCss plugin to minify your CSS with clean-css
Stars: โœญ 41 (+192.86%)
Mutual labels:  postcss
meteor-postcss
PostCSS for Meteor
Stars: โœญ 68 (+385.71%)
Mutual labels:  postcss
element-plus-admin
ๅŸบไบŽvite+ts+elementPlus
Stars: โœญ 361 (+2478.57%)
Mutual labels:  postcss
dva-typescript-antd-starter-kit
A admin dashboard application demo based on antd by typescript and dva
Stars: โœญ 61 (+335.71%)
Mutual labels:  postcss
vite-ts-tailwind-starter
Opinionated Vite + Vue 3 + TypeScript + Tailwind CSS starter template w/ tests and CI.
Stars: โœญ 228 (+1528.57%)
Mutual labels:  postcss
postcss-aspect-ratio
A PostCSS plugin to fix an element's dimensions to an aspect ratio.
Stars: โœญ 38 (+171.43%)
Mutual labels:  postcss

Caesura CSS Logo

npm version

Caesura is a reasonable breakpoint scale using @custom-media.

Note: This project is in early development, and versioning is a little different. Read this for more details.

.foo {
  border: 1px solid green;

  @media (--xl) {
    border: 3px solid red;
  }
}

Installation

Install with npm: npm install caesura

Make sure you have postcss-import and @custom-media (or cssnext) installed, then import caesura at the top of your css:

@import 'caesura';

<!-- Your css code here -->

That's it!

The scale

Breakpoint:     320px       448px         768px         1024px       1280px             1800px
            โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€
      Name:    '--xs'       '--s'         '--m'         '--l'        '--xl'              '--hd'
@custom-media --xs (width < 320px);
@custom-media --s (width < 448px);
@custom-media --m (width < 768px);
@custom-media --l (width < 1024px);
@custom-media --xl (width < 1280px);
@custom-media --hd (width < 1800px);

@custom-media --above-xs (width >= 320px);
@custom-media --above-s (width >= 448px);
@custom-media --above-m (width >= 768px);
@custom-media --above-l (width >= 1024px);
@custom-media --above-xl (width >= 1280px);
@custom-media --above-hd (width >= 1800px);

@custom-media --retina (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi);
@custom-media --landscape (orientation: landscape);
@custom-media --portrait (orientation: portrait);

I've yet to find a great use-case for needing below or at rules for media queries. I'm happy to add/revise if there are other examples people need. Furthermore, content should dictate breaking points, but sometimes it's just nice to have your trusty standby stops.

Feel free to point out any issues, or open a PR!

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].