Breaks2000
Responsive elements script.
Install / Use
/learn @judas-christ/Breaks2000README
Breaks 2000
A simple responsive elements script. Inspired by https://github.com/kumailht/responsive-elements but simpler and without any dependencies.
Usage
Add breakpoints to responsive elements
<div data-breaks="320,480,768,1280">...</div>
Add CSS styles for the sizes
.\>320 {
background-color: peachpuff;
}
.\>768 {
background-color: aliceblue;
}
Add breaks2000 script to page
<script src="https://unpkg.com/breaks2000"></script>
or if you prefer to self-host
<script src="/path/to/breaks2000.min.js"></script>
Call initialization function on page load
breaks2000.init();
When adding elements to page call
breaks2000.update();
If, for some reason, breaks2000 has to be deactivated on a page call
breaks2000.uninit();
Browser support
Modern browsers and optionally IE8.
Change Log
2.3.0
- UMD bundle
- unpkg CDN example
2.2.0
- ES6 module support
- CJS module support
2.1.2
- Bower support
2.1.1
- Bugfixes
2.1.0
- Added optional
uninit()function for removing breaks2000.
2.0.0
- Class names changed from
gt-[size]/lt-[size]to>[size]/<[size]. This is a breaking change from 1.0.0
License
Released under MIT License.
Related Skills
node-connect
350.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
350.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
350.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
