Basic.css – Classless CSS Starter File

栏目: IT技术 · 发布时间: 4年前

内容简介:Classless CSS Starter FileBasic.css gives you basic CSS formatting and ability to make basic grids with only HTML5 syntax. You can use this project to Set your default styling.

Basic.css

Classless CSS Starter File

Basic.css gives you basic CSS formatting and ability to make basic grids with only HTML5 syntax. You can use this project to Set your default styling.

List of features

  • Lightweight 1kb minified and gzipped.
  • Basic typography.
  • Basic forms.
  • Custom colors.
  • Dark theme.
  • Round corners.
  • Flex Grid without classes.
  • Flex Grid cards.

Demo: https://vladocar.github.io/Basic.css/

This project uses the best elements from my previous projects:

You can change root css variables with your color palette:

:root{
--c1:#0074d9;
--c2:#eee;
--c3:#fff;
--c4:#000;
--c5:#fff;
}

Or adjust the round corners

By default are 8px, use --rc: 0px; if you don't like round corners.

:root{
--rc: 8px;
}

Override the colors in the dark mode:

@media (prefers-color-scheme: dark) {
	:root {
        --c2:#333;
        --c3:#1e1f20;
        --c4:#fff;
	}
}

How you can use the infinity flex grid?

Use the HTML5 tags section and nested section to make flex grid.

<section>
  	<section> 1 </section>
	<section> 2 </section>
	<section> 3 </section>
</section>
<section>
	<section> 1 </section>
	<section> 2 </section>
	<section> 3 </section>
	<section> 4 </section>
</section>

Demo: https://vladocar.github.io/Basic.css/grid.html

Use the HTML5 tags selection and article to make cards.

<section>
    <article> 1 </article>
    <article> 2 </article>
    <article> 3 </article>
</section>

Demo: https://vladocar.github.io/Basic.css/cards.html

How to use this project?

Simply download and personalize the basic.css file.

Or

npm i @vladocar/basic.css

Why should you use this project?

Instead of using CSS Reset you could just Set the basic css formatting and styling. You could even make some grids with the HTML5 tags. Naturally if you want to build something more complex you should use CSS classes and this project works great in combination with other CSS frameworks.


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

深入浅出Web设计(中文版)

深入浅出Web设计(中文版)

(美)瓦特罗尔、(美)西罗托 / O'Reilly Taiwan公司 / 东南大学出版社 / 2010-11 / 99.00元

你将从《深入浅出Web设计(中文版)》学到什么?你曾经希望看看书就能学到真正的网站设计吗?曾经想过该如何同时达成让网站看起来美观,又能有效率地沟通信息,还要通过可访问性与可用性的策略吗?《深入浅出Web设计》正是精通上述主题的秘笈。我们将学到如何设计一个绝佳、用户友好的网站,上谈客户需求,下说手绘分镜表,乃至完成在线所需的HTML与css主文件……而且会有一个真正可以运作的网站!一起来看看 《深入浅出Web设计(中文版)》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

SHA 加密
SHA 加密

SHA 加密工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具