chris-pearce / backpack.css Goto Github PK
View Code? Open in Web Editor NEWA lightweight and somewhat opinionated CSS foundation that is best suited to applications π.
License: MIT License
A lightweight and somewhat opinionated CSS foundation that is best suited to applications π.
License: MIT License
https://webkit.org/blog/7929/designing-websites-for-iphone-x.
This'll most likely require a new section unless it goes in resets.css
?
backpack.css/src/image-and-multimedia.css
Lines 1 to 12 in 318df58
This: #27 wasn't done properly, basically it was a bit of rushed job, therefore, it needs more care. This task is about removing it until it can be revisited.
Autoprefixer needs to be part of the build script to ensure backpack.css matches its browser support matrix.
As we're focusing on app styles this rule isn't needed.
Remove all custom properties.
Ability to turn off all OpenType features?
Remove 'typography.css' and merge those styles into existing files?
Add classes for the following OpenType features?
::selection
property.
font-display
property (see).
hyphens
property.
object-fit
property.
Responsive type:
Implement system-ui
(Autoprefixer won't deal with this so we need to provide a fallback font-stack).
Set the font family of the entire document to use the new 'system-ui'
font-family
value,-apple-ui
is for OS X Firefox support, and finally we fall back to 'sans-serif' for user-agents that don't support 'system-ui'.
βοΈ Resources
https://caniuse.com/#search=system-ui
https://drafts.csswg.org/css-fonts-4/#system-ui-def
https://github.com/jonathantneal/system-font-css
Remove the disclosure widget from the <summary>
element (see)
PostCSS plugins:
Look at Bootstrap.
Need to keep an eye on, see:
inline-text-semantics.css
for some reason isn't imported into index.css
π€·ββοΈ.
:focus:not(:focus-visible) {
outline: none;
}
Credit
The
:focus:not(:focus-visible)
selector allows me to remove theoutline
in cases where the browser has deemed that the focus does not need to be visible. For browsers that donβt yet support the:focus-visible
pseudo-class, the entire rule is ignored and the outline remains as normal.
βhttps://bitsofco.de/my-css-reset-base/
Might need to hold off on this as it appears it causes issues for users on High-Contrast Mode, see here.
Something like:
blockquote,
q {
quotes: none;
}
blockquote:after,
blockquote:before,
q:after,
q:before {
content: "";
content: none;
}
Use lint-staged.
Use stylelint.io and lint-staged.
A Credit section for the README.md
:
And a blurb on the file structure in src
for CONTRIBUTING.md
.
This'll override the default "8" which is a bit big. Further details here.
I think it makes sense to limit files that don't fit into MDN's HTML elements reference document sections.
Probably should be a new version of CSS Guidelines.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details. This may be too opinionated.
Resources
backpack.min.css
Libs to use:
postcss-csso
So not doing this:
Lines 1 to 10 in 318df58
audio,
canvas,
iframe,
img,
svg,
video {
vertical-align: middle;
}
module.exports
all of the lib from a index.js
file.
Motivated by this article. If it goes then either set font-family
as sans-serif
or don't set it at all.
Need to dig into this more (beyond that article).
More insights:
I'm getting the following console warning:
Replace text-decoration-skip: ink to text-decoration-skip-ink: auto, because spec had been changed
It's refering to this line.
I'm on the following version of backpack/postcss:
"backpack.css": "^1.3.0",
"postcss-cli": "^6.1.1",
"postcss-loader": "^3.0.0",
"postcss-preset-env": "^6.5.0",
Look into CircleCI.
As user-agent styles set it to center
.
If we're setting a system at the root level (on the html
element) then it makes sense to do the same for elements that use a monospace font.
This seems to be the common font stack.
Some packages to look at:
And Yarn should be mentioned in the docs, not npm.
@media (prefers-reduced-motion: reduce) {
* {
animation: none !important;
scroll-behavior: auto !important;
transition: none !important;
}
}
https://twitter.com/scottjehl/status/1085600505299111936?s=20
By default button
element doesn't get cursor: pointer
like a
does cause reasons. However, the argument is, seeing that everyone does set cursor: pointer
for button
s it's become ubiquitous on the Web.
See here:
I really don't like this and agree 100% with this tweet. But caring about accessibility I feel my hands are tied.
Here is the related code:
backpack.css/src/text-content.css
Lines 1 to 10 in 318df58
[disabled] {
cursor: not-allowed;
};
This is already underway (see the tests
folder). For now, visual regression testing can be done via the html5-test-page.html
file that can be accessed in the browser when running yarn test
(http://localhost:3000/html5-test-page.html).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.