All Projects → marmelab → Universal.css

marmelab / Universal.css

Licence: wtfpl
The only CSS you will ever need

Projects that are alternatives of or similar to Universal.css

Awesome Windows Kernel Security Development
windows kernel security development
Stars: ✭ 1,208 (-3.13%)
Mutual labels:  framework
Forge
Basic experiment framework for tensorflow.
Stars: ✭ 79 (-93.66%)
Mutual labels:  framework
Enduro2d
Yet another 2d game engine of dreams (work in progress)
Stars: ✭ 82 (-93.42%)
Mutual labels:  framework
Cthackframework
游戏外挂通用框架,快速构建外挂程序。
Stars: ✭ 78 (-93.74%)
Mutual labels:  framework
Neo
Create blazing fast multithreaded Web Apps
Stars: ✭ 1,219 (-2.25%)
Mutual labels:  framework
Go Web
A new Golang MVC Framework. Like Laravel... but faster!
Stars: ✭ 79 (-93.66%)
Mutual labels:  framework
Rsf
The Robot Security Framework (RSF), Robot Security Framework (RSF), a standardized methodology to perform security assessments in robotics.
Stars: ✭ 76 (-93.91%)
Mutual labels:  framework
Framework
The Tastphp Framework Core
Stars: ✭ 82 (-93.42%)
Mutual labels:  framework
Setl
A simple Spark-powered ETL framework that just works 🍺
Stars: ✭ 79 (-93.66%)
Mutual labels:  framework
Infima
A UI framework that provides websites with the minimal CSS and JS needed to get started with building a modern responsive beautiful website
Stars: ✭ 82 (-93.42%)
Mutual labels:  framework
Kales
Kotlin on Rails
Stars: ✭ 78 (-93.74%)
Mutual labels:  framework
Transformers
基于 JavaScript 的组件化开发框架,如果你想以搭积木的方式开发项目,那就试试 Transformers 框架吧~
Stars: ✭ 78 (-93.74%)
Mutual labels:  framework
Duality
a 2D Game Development Framework
Stars: ✭ 1,231 (-1.28%)
Mutual labels:  framework
Pilgo
Configuration-based dotfiles manager
Stars: ✭ 78 (-93.74%)
Mutual labels:  framework
Homie Esp8266
💡 ESP8266 framework for Homie, a lightweight MQTT convention for the IoT
Stars: ✭ 1,241 (-0.48%)
Mutual labels:  framework
Seed Rs Realworld
Exemplary real world application built with Seed
Stars: ✭ 77 (-93.83%)
Mutual labels:  framework
Framework
Lift Framework
Stars: ✭ 1,224 (-1.84%)
Mutual labels:  framework
Typetron
Modern Node.js framework for creating fully-featured apps
Stars: ✭ 82 (-93.42%)
Mutual labels:  framework
Unity Experiment Framework
UXF - Framework for creating human behaviour experiments in Unity
Stars: ✭ 81 (-93.5%)
Mutual labels:  framework
Openmod
OpenMod .NET Plugin Framework
Stars: ✭ 81 (-93.5%)
Mutual labels:  framework

universal.css

The only CSS you will ever need.

Features:

  • Self-documented classnames
  • Zero dependencies
  • Classnames are reusable across projects
  • Removes the need for a CSS preprocessor
  • Removes the need for a CSS bundler
  • No more custom CSS required
  • No need to switch between HTML and CSS file while developing
  • HTTPS ready
  • No more debate about rule naming (dash, double dash or underscore?). The CSS spec is all we need!

Usage

Insert this one line in your HTML source file:

<link rel="stylesheet" src="https://cdn.rawgit.com/marmelab/universal.css/master/universal.css" />

Then you can change the CSS classes in your HTML to universal CSS classes:

Before:

<!-- index.html -->
<div class="sidebar">
    <!-- sidebar content -->
</div>
/* main.css */
.sidebar {
    border-top: 1.04em dotted lightgrey;
    border-bottom: 12px solid cornflowerblue;
    border-top-right-radius: 1.60em;
    padding: 5px;
    margin-left: 10px;
    background-color: fuchsia;
}

After:

<!-- index.html -->
<div class="
  border-top-width-1-dot-04em
  border-top-style-dotted
  border-top-color-lightgrey
  border-bottom-width-12px
  border-bottom-style-solid
  border-bottom-color-cornflowerblue
  border-top-right-radius-1-dot-60em
  padding-5px
  margin-left-10px
  background-color-fuchsia
">
    <!-- sidebar content -->
</div>
/* main.css */
/* Nothing! */

Check out our demo

FAQ

Where is the documentation?

You don't need documentation. Take any CSS rule you want to apply, replace : by -, and dots by -dot-, and you get the name of the corresponding universal css classname. For instance,

border-top-right-radius: 1.60em => .border-top-right-radius-1-dot-60em

How can you know which classes I need?

We use a smart CSS generator, based on statistical analysis of most used CSS rules, and coupled with a sophisticated prediction engine. Check out the source code for details.

Do you provide a minified version?

universal.css is already highly optimized, and wouldn't benefit much from minification. Check this extract of the source code for a glimpse of the universal.css file syntax.

.color-black { color: black; }
.background-color-black { background-color: black; }
.border-color-black { border-color: black; }
.color-blanchedalmond { color: blanchedalmond; }
.background-color-blanchedalmond { background-color: blanchedalmond; }
.border-color-blanchedalmond { border-color: blanchedalmond; }

But universal.css weights several MBs. How can I optimize the rendering time?

You're covered! If you don't want your users to download a large CSS file, replace the <link> tag with a <script> tag:

<script src="https://cdn.rawgit.com/marmelab/universal.css/master/universalCssGenerator.js"></script>

That's right! Our generator works both in the backend and in the frontend - it is truly universal. The JavaScript file is much lighter, and will load very quickly. Once loaded, it generates the universal.css styles directly in the browser.

I need a class for Webdings Fonts.

Universal.css is a community effort, currently at an early stage. We don't yet cover all CSS rules, but we welcome every Pull Request helping us to achieve feature completeness.

How can I deal with responsive designs and break points?

We're studying the question, please open an issue if you have a good idea about how to do it.

Where did you get the inspiration from?

Bootstrap V4 recently introduced spacing utility classes like m-t-1 (which translates to margin-top: 1rem!important), and we thought we'd expand this idea to more classes.

Is this a joke?

Of course it's a joke. Use semantic CSS class names.

License

Universal.css is provided free of charge, courtesy of marmelab, under the WTFPL License.

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