GithubHelp home page GithubHelp logo

doctacosa / css-base Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 99 KB

CSS base to get sensible defaults on any site or individual page

License: MIT License

SCSS 20.61% HTML 30.69% JavaScript 4.70% CSS 44.00%

css-base's Introduction

Interordi CSS Base

This set of CSS rules are designed to serve as a base for any page, site or web application. The included styles are simple, sensitive defaults, plus are easy to override.

Both light and dark modes are provided, in order to have a working base for any type of website. Include one or the other stylesheet to quickly change.

This is currently used on the Interordi family of sites.

Why

I wanted to establish a base that would look good across multiple browsers and platforms while not requiring additional markup. Include normalize.css and base.css (or base-dark.css) and you're ready to go, no extra adjustments necessary.

Many CSS toolkits try to come with everything but the kitchen sink, or require tons of additional HTML tags to work as expected. Others will apply their defaults automatically, but they're strongly opiniated and/or include fonts and colors that then need to be overriden for each individual site, which I didn't want.

The Interordi CSS Base aims to work just like the browser defaults, but with a more modern appearance, while looking the same on multiple platforms. It also adds a few optional conveniences. Nothing more, nothing less.

Additions

A few elements are added beyond the default styling.

Toggles

These are situational replacements for checkboxes, made popular with mobile apps and newer software.

Syntax: <input type="checkbox" class="toggle">

Forms

form-horizontal and form-vertical will define the two basic visual types for forms. Structure sample:

<form class="form-vertical">
  <div class="form-group">
    <label>First label</label>
    <input type="text" />
  </div>

  <div class="form-group">
    <label>Second label</label>
    <input type="text" />
  </div>
</form>

Alerts and main actions

Use the following five classes on various items to create a standardized visual.

alert-primary
alert-success
alert-error
alert-warning
alert-info

Using these on a <div> will display IT as a notification banner. Adding it to a <button> or any relevant form element will highlight these elements, making them stand out to users.

Requirements

Get a copy of normalize.css, either downloaded or linked, then include your choice of base.css or base-dark.css.

Demo

The included test_css_light.html and test_css_dark.html will preview all styled HTML elements.

You can also view live copies here:

css-base's People

Contributors

doctacosa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.