Code Monkey home page Code Monkey logo

ress's Introduction

A brunch and the ress name

Modern CSS reset

Build Status Size npm

Installation

npm install --save ress

or

yarn add ress

Features

  1. Apply box-sizing: border-box; in all elements.
  2. Reset padding and margin in all elements.
  3. Specify background-repeat: no-repeat in all elements and pseudo elements.
  4. Inherit text-decoration and vertical-align to ::before and ::after.
  5. Remove the outline when hovering in all browsers.
  6. Specify font-family: monospace in code elements.
  7. Reset border-radius in input elements.
  8. Specify font inheritance of form elements.
  9. Remove the default button styling in all browsers.
  10. Specify textarea resizability to vertical.
  11. Apply cursor: pointer to button elements.
  12. Apply tab-size: 4 in html.
  13. Style select like a standard input.
  14. Style cursor by aria attributes.

Crossbrowser

ress uses Normalize.css under the hood with some customizations to apply a solid base to start your stylesheet.

Browser support

  • Chrome
  • Edge
  • Firefox ESR+
  • Internet Explorer 10+
  • Opera
  • Safari 8+

CDN

unpkg

https://unpkg.com/ress/dist/ress.min.css

jsDevlivr

# Production
https://cdn.jsdelivr.net/npm/[email protected]/dist/ress.min.css

# Development
https://cdn.jsdelivr.net/gh/filipelinhares/ress@latest/dist/ress.min.css

License

MIT ยฉ Filipe Linhares

ress's People

Contributors

blrosende avatar filipelinhares avatar goestoeleven avatar gregoryhammond avatar jakobw avatar kukac7 avatar matteobad avatar wiese avatar yassh avatar yuheiy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ress's Issues

[disabled] rule is defined too soon

/* Replace pointer cursor in disabled elements */
[disabled] {
  cursor: default;
}

This rule is overridden by the button rule that sets the cursor to pointer.

Solution: define the rule later in the CSS.

Button color

The button style adds a "color: inherit" property, which adds complexity to style the button

/* Apply cursor pointer to button elements */
button,
[type='button'],
[type='reset'],
[type='submit'],
[role='button'] {
  cursor: pointer;
  color: inherit;
}

Non minified version in dist

Can you please change your build system so that a non minified version is also stored in the dist folder. It helps sometimes.

CDN?

Hi, thanks for sharing this, this is really useful. Is this library on a CDN? It would be great if one can just insert a link tag to a CDN hosted version of this library.

border-style on iframe elements

Hi @filipelinhares,

I noticed that iframe on chrome (didn't test other browsers) have the following:

border-width: 2px;
border-style: inset;
border-color: initial;
border-image: initial;

I was thinking that maybe we could add a border-style: none to align default styling.
What do you think? Is this in the scope of this library?

Thank you in advance ๐Ÿ˜

Apply cursor: pointer to button elements

It has always bugged me that buttons don't default to the pointer cursor.
An implementation that excludes the "disabled" attribute would make sense.

button {
    cursor: pointer;
}

button:disabled {
    cursor: default;
}

Input content multiline

Hi, I've noticed that the property word-break: break-word is behaving differently in different browsers. In particular, the content of an input tag, if too long, will break on multiple lines in Safari but not in Chrome.

Since the default value is word-break: normal I would suggest changing this. Let me know.
Thanks

button:active color property is not reset

button:active color property is not reset. This is problematic in Safari which uses

input:matches([type="button"], [type="submit"], [type="reset"]):active, input[type="file"]::-webkit-file-upload-button:active, button:active {
  color: activebuttontext;
}

where activebuttontext is code for white.

Weird looking radio buttons in Safari Mobile

I think this is because of:

button,
input,
select,
textarea {
  background-color: transparent;
  border-style: none;
  color: inherit;
}

and

input {
  border-radius: 0;
}

Should we add :not([type=checkbox]):not([type=radio]) to those?

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.