Releases: chharvey/xmeter
v7.2.0
v7.1.0
Features
- use 32-bit hex color syntax (
#rrggbbaa), keeping fallbacks for browsers not yet supporting it - add default hover/focus shadow styles for form elements
- vertical spacing Atoms
- remove opinionated list styles
Fixes
- fix
.h-Ruledbackground-origin - border and border-radius fixes
- documentation updates
- dependency updates
v7.0.0
Changelog
Breaking Changes
- keyword
!importanthas been removed from all atoms (namely, the.-fzatoms). this change could break specificity, so read below for instructions on how to fix. - Xmeter no longer supports media-specific stylesheets, e.g.
xmeter-sK.css. From now on, you are expected to extend classes yourself. Read below for how to.
Removed
- Pug partial
_views/_c-Permalink.view.pugis gone, along with the Permalink component. The component has been moved to aria-patterns. - styles for
.o-Tablist,.c-Permalink, and.h-Hiddenare gone; moved to aria-patterns - Pug partial
/docs/_includes/_base.pugis gone and has been replaced with/docs/tpl/base.tpl.html. - Directory
/src/is gone. All css source files are in/css/src/. - build files
/css/xmeter.cssand/css/xmeter.css.maphave been moved to/css/dist/directory. - deprecated
/xmeter.cssis gone - (internal)
Xmeter.classand its views are gone - Custom property
--vruis gone and renamed to--lh. This is only a superficial change, butvar(--vru)will no longer work. Usevar(--lh)instead, and while you're add it, start using thelhunit as well. Read below for details.
New Features
- The Xmeter package offers
xmeter.cssin addition to constituent parts, such aso-List.css, for when you want to import specific patterns only. See the updated README for details. - package metadata is prepended to build file contents, in the form of a comment, so you can see what version you’re using directly from the asset.
- add underline to all links
- cursor of UI components (forms, interactive) to match browser default
- move informal hyperlink design comments to style guide, Principles page
Fixes
- better support for logical properties & values
- fix an issue where Flex item and Grid item text-level elements were overlapping vertically
- removed an unused lib file
- dependency updates
- documentation updates
Discussion
!important has been removed from Atoms! What do I do?
Since xmeter.css (a base stylesheet) is imported first, the atoms used to have !important in order to override any other styles applied afterward. However, I’ve decided that this was an abuse of a css feature meant for debugging only. Therefore Atoms no longer sport the !important keyword.
Here’s an example.
<link rel="stylesheet" href="xmeter.css"/> <!--
.-fz-kilo { font-size: 1.5em; }
-->
<link rel="stylesheet" href="my-styles.css"/> <!--
.c-Hed { font-size: 1.25em; }
-->
<h1 class="c-Hed -fz-kilo">Page Title</h1>The .c-Hed style has 1.25em font-size applied, but we want to override this particular instance with .-fz-kilo, a 1.5em font-size, since it’s the page title. Since xmeter.css is a base, it is imported first, followed by my-styles.css, so the .-fz-kilo gets overridden anyway, which is not what we want. We want Atom styles to override Component styles. Previously, !important had been added to .-fz-kilo to force the specificity to take precedence.
I decided that that technique used a css feature as a hack to fight against specificity. Xmeter@7 is written to work with css specificity the right way. So all we have to do is import our stylesheets in the right order.
<!-- NOTE: link hrefs are not exact -->
<!-- base styles -->
<link rel="stylesheet" href=".../xmeter/.../base.css"/>
<!-- Object styles -->
<link rel="stylesheet" href=".../xmeter/.../o-*.css"/>
<link rel="stylesheet" href="my-objects.css"/>
<!-- Component styles -->
<link rel="stylesheet" href=".../xmeter/.../c-*.css"/>
<link rel="stylesheet" href="my-components.css"/> <!--
.c-Hed { font-size: 1.25em; }
-->
<!-- Helper styles -->
<link rel="stylesheet" href=".../xmeter/.../h-*.css"/>
<link rel="stylesheet" href="my-helpers.css"/>
<!-- Atom styles -->
<link rel="stylesheet" href=".../xmeter/.../-*.css"/> <!--
.-fz-kilo { font-size: 1.5em; }
-->
<link rel="stylesheet" href="my-atoms.css"/>
<!-- HACK styles -->
<link rel="stylesheet" href="my-hacks.css"/>
<h1 class="c-Hed -fz-kilo">Page Title
(now the correct size)</h1>This technique splits up CSS files into smaller parts, but the constituent parts are loaded and applied in the correct order: from low to high specificity: from generic to explicit: from far-reaching to localized. (The example above uses hypothetical file names. See the README for a list of real files you can use.)
What happened to all the suffixes?
The stylesheets xmeter-sK.css and others (with media-specific suffixes) have been removed, because they were a fringe use case. There is no reason anyone would normally need an entire stylesheet nested inside a media query. If you want to use a specific media query class, you are expected to write it yourself, like so:
@import (reference) url('/node_modules/xmeter/css/dist/o-List.css');
/* `.o-List-sK` acts like `.o-List`, but only on screens >= 30em */
@media screen and (min-width: 30em) {
.o-List-sK {
.o-List;
// or `&:extend(.o-List);`
// or copy-paste the code in `.o-List`
}
}What’s all this about a new lh unit?
CSS Values Level 4 plans to introduce a new unit, lh, equal to the computed value of line-height. It is not yet supported by any browsers, but it could’t hurt to start using it now. (Why set yourself up for more work further down the road?) The --lh custom property computes this value. Example:
.my-figure {
margin-bottom: (2 * 1.5rem); // fallback for custom properties
margin-bottom: calc( 2 * var(--lh) ); // fallback for `lh` unit
margin-bottom: 2lh; // works when supported, skips when not
}As always, we observe the principle of progressive enhancement by ordering our rules from oldest to newest. The newer features, when supported, will override the older features.
v6.5.0
Features
New
- All-new type scale and font sizes. This affects the default font-sizes of
<h1>thru<h6>. This is considered non-breaking, even though it is a style change. -
.-mb-*and.-pt-*Atoms have been added back in. They were taken out awhile ago but now they’re back and improved! I realized these classes were absolutely essential to designing with vertical rhythm. See the docs for info.
Changed
- the
.-fz-*Atoms now have--font-scaleand--trackscustom properties built-in, so you can use them with the.h-FontSizehelper if you want
Fixed
- fix some comments & formatting
- updated documentation no longer uses Pug
v6.4.0
Breaking
- upgrade to
gulp-lessv4.0.0
Changed
- add
<slot>to base docs - update comments & code formatting
- #14 mitigate render-blocking stylesheets (see README for details)
- split IE hacks stylesheet into respective parts
New
- All-new published documentation! Check out the
gh-pagesbranch for generated documentation./docs/styleguide/is not checked in on themasterbranch, but is checked in ongh-pagesto be published. Visit https://chharvey.github.io/xmeter/docs/styleguide/ to see the published docs. - new
.h-FontSizeHelper! Now you can use custom properties to set the font-size & line-height (together) of an element while preserving vertical rhythm. Read the new docs for details.
v6.3.0
Non-Breaking Changes
New
- add new Constrain Helper
.h-Constrain, which sets the max-inline-size (width) of an element.
Changed
- in style guide, rename Organism → Interface
Deprecated
-
.o-Tablistand its markup are DEPRECATED. It is moving to https://github.com/chharvey/aria-patterns -
Xmeter.VIEW.permalinkis DEPRECATED. It is also moving to https://github.com/chharvey/aria-patterns
v6.2.0
Non-Breaking Changes
- restyle hyperlinks:
aelements without[href]are no longer styled; now onlya[href]are colored. The color has also been changed from#00eto#06c. Also,a:not([href])are no longer decreased opacity. - new vertical rhythm features, including
lhunit - DEPRECATED:
--vrucustom property: use--lhinstead (just a rename).--lhis a custom prop for browsers that don’t support thelhunit.--vruwill be removed in v7+ - add more logical properties & values (#15)
- add separate stylesheet for IE fallbacks
Fixes
- fix
thtext-alignment (#17) - fix an issue in the
.h-Measurehelper wheremax-inline-sizewas not overridingmax-widthin vertical writing modes - fix missing quotation marks on
qelement - style change: links are now colored
#0066cc, to meet contrast ratio requirements - refactors & updates to code formatting
- update dependencies
v6.1.1
v6.1.0
Minor Changes
Added
API
- add
/class/Xmeter.class.js(main exported object) - new view for
.c-Permalinkdesign component
Styles
- all-new
.o-TablistObject! - all-new
.h-MeasureHelper! (#13) - all-new
.h-RuledHelper! (background for checking vertical rhythm, #7) - add new
markcolor (opinionated)
Changed
-
/docs/_models/Docs.class.js→/docs/class/Docs.class.js -
/src/→/css/src/
Deprecated
Things in this section are DEPRECATED: still present but will lose support & be dropped in the next major release.
- move all files from
/src/into/css/src/. main filexmeter.cssis now located at/css/xmeter.css, and Less tools are now located in/css/src/__tool.*.less. be sure to update your projects when@importing or<link/>ing! -
_views/_c-Permalink.view.pugdeprecated. CallXmeter.view(data).permalink()instead.
v6.0.0
Major Changes
These are breaking changes; your code will break if you do not update it and want to use these features.
File removals/renamings
- the minified file
xmeter.min.cssis no longer available. Usexmeter.cssinstead: it is already minified and has a sourcemap. - moves
xmeter.lessintosrc/xmeter.less - deletes OBSOLETE
__tool.clearfix.less. use.h-Clearfixhelper instead of.clearfix()mixin. - deletes OBSOLETE
_-mb.lessand_-pt.lessatom classes (deprecated in v5.7) - removes deprecated
/docs/includes/_base.docs.jade,/docs/_includes/base.docs.jade, and/docs/_includes/_base.jade. if your project references either of these files, change it to/docs/_includes/_base.pug. sorry for all the renaming. - uses directory
/src/and REMOVES/styles/. remember to update your project code if@importing these files - removes all fallback mixins! Do not reference any file starting with
__fallbackanymore! Use Autoprefixer in your own project instead. - deletes OBSOLETE
__tool.vertspacing.lessin favor of CSS custom properties ("native variables"), and corresponding mixin.vertspacing()
Code renamings/repurposes
- removes OBSOLETE
.transition-multi()mixin. use CSStransitionproperty instead (with Autoprefixer if you wish) - removes OBSOLETE negative breakpoint classes suffixed with
-ns*(e.g.,-nsK). Instead, use-n*(e.g.-nK). see #11 (deprecated in v5.7) - REPURPOSED! Grid Object, now using CSS Grid! (note: appearance has not changed, but support may have changed. if you use
.o-Gridin your code, in conjunction with flexbox properties, you will need to revisit.) - renames variables in
/src/__settings.less. uses hyphens instead of underscores
Other Drops
- drops pixel fallback for rem units (rems are not supported on IE8- and IE9 and IE10 on the
fontshorthand property and on pseudo-elements/classes) - fix
.font-size-el()params: removes 3rd parameter. Now only takes two params:.font-size-el(@ratio: 1; @lines: 1) - drops fallbacks for CSS custom properties ("native variables")
- drops global Less variables
@g-line-heightand@g-vru, in favor of CSS custom properties. watch out if you use these! switch tovar(--line-height)andvar(--vru)respectively. - drops
@mediaqueriesscreenandprintfor all Objects, Components, and Atoms. The following queries are available:@media screen and (min-width: 30em) {} // suffix -sK @media screen and (min-width: 45em) {} // suffix -sM @media screen and (min-width: 60em) {} // suffix -sG @media screen and (min-width: 75em) {} // suffix -sT @media screen and (min-width: 90em) {} // suffix -sP @media not all and (min-width: 30em) {} // suffix -nK @media not all and (min-width: 45em) {} // suffix -nM @media not all and (min-width: 60em) {} // suffix -nG @media not all and (min-width: 75em) {} // suffix -nT @media not all and (min-width: 90em) {} // suffix -nP
Minor Changes
These are non-breaking changes; your code does not need to be updated if you want to use these features.
- All-new documentation & style guide generated by KSS. Not yet published, but meanwhile you can build them yourself:
then check out
$ cd node_modules/xmeter/ $ npm install $ npm run kssfile://path/to/xmeter/styleguide/!
Fixes
- fixes borders on
fieldsetelements - remove styles in
reset.cssthat are overridden by_base.less - add fallbacks for
unsetinreset.css - update
ins&del, colors (GitHub opinionated)