Modern CSS reset
Installation
npm install --save ress
or
bower install --save ress
Features
- Apply
box-sizing: border-box;
in all elements. - Reset
padding
andmargin
in all elements. - Specify
background-repeat: no-repeat
in all elements and pseudo elements. - Inherit
text-decoration
andvertical-align
to::before
and::after
. - Remove the
outline
when hovering in all browsers. - Specify
font-family: monospace
in code elements. - Reset
border-radius
in input elements. - Specify font inheritance of form elements.
- Remove the default button styling in all browsers.
- Specify textarea resizability to vertical.
- Apply
cursor: pointer
to button elements. - Apply
tab-size: 4
inhtml
. - Style
select
like a standard input. - 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
Inherit from Normalize
CDN
https://unpkg.com/ress/dist/ress.min.css
# Production
https://cdn.rawgit.com/filipelinhares/ress/master/dist/ress.min.css
# Development
https://rawgit.com/filipelinhares/ress/master/dist/ress.min.css
License
MIT © Filipe Linhares
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.
Weird looking radio buttons in Safari Mobile
I think this is because of:
and
Should we add
:not([type=checkbox]):not([type=radio])
to those?Remove form elements' focus outline
This removes outlines around focused form elements, which is not consistently applied across all browsers. Most notably, Chrome recently rolled out an update which adds large outlines around focused form elements.
See also https://blog.chromium.org/2020/03/updates-to-form-controls-and-focus.html
Button color
The button style adds a "color: inherit" property, which adds complexity to style the button
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. Thanksbutton:active color property is not reset
button:active color property is not reset. This is problematic in Safari which uses
where activebuttontext is code for
white
.[disabled] rule is defined too soon
This rule is overridden by the button rule that sets the cursor to pointer.
Solution: define the rule later in the CSS.
Change out rawgit links to jsDelivr
Rawgit has been in the sunset phase for a couple of years now (since October 2018) and the creator has encouraged people to use alternatives.
I have replaced the rawgit links with JSDelivr links.
border-style on iframe elements
Hi @filipelinhares,
I noticed that
iframe
on chrome (didn't test other browsers) have the following: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 😁
Avoid `cursor: default` when `aria-disabled="false"`
Before fix
<a href="" aria-disabled="false">
=> default cursor<a href="" aria-disabled="true">
=> default cursorAfter fix
<a href="" aria-disabled="false">
=> pointer cursor<a href="" aria-disabled="true">
=> default cursorBump ini from 1.3.5 to 1.3.8
Bumps ini from 1.3.5 to 1.3.8.
Commits
a2c5da8
1.3.8af5c6bb
Do not use Object.create(null)8b648a1
don't test where our devdeps don't even workc74c8af
1.3.7024b8b5
update deps, add linting032fbaf
Use Object.create(null) to avoid default object property hazards2da9039
1.3.6cfea636
better git push script, before publish instead of after56d2805
do not allow invalid hazardous string as section nameMaintainer changes
This version was pushed to npm by isaacs, a new releaser for ini since your current version.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labels
will set the current labels as the default for future PRs for this repo and language@dependabot use these reviewers
will set the current reviewers as the default for future PRs for this repo and language@dependabot use these assignees
will set the current assignees as the default for future PRs for this repo and language@dependabot use this milestone
will set the current milestone as the default for future PRs for this repo and languageYou can disable automated security fix PRs for this repo from the Security Alerts page.