1
1
mirror of https://github.com/primer/css.git synced 2024-12-28 16:45:52 +03:00

Merge branch 'master' into release-9.6.0

This commit is contained in:
Shawn Allen 2017-10-10 20:50:05 -07:00 committed by GitHub
commit 053c9f167d
32 changed files with 192 additions and 150 deletions

View File

@ -1,3 +1,21 @@
# 9.5.0
### Added
- It's now possible to style `<summary>` elements as buttons and have them appear in the active/selected state when the enclosing [`<details>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details) is open. #346
### Changes
- Updates our release candidate versioning logic so that prerelease increments are done on a per-module basis, fixing #350.
# 9.4.0
### Added
- Add `v-align-baseline` class to `primer-utilities` #324
- Add deprecation warnings for `primer-cards` and `primer-forms/lib/form-validation.scss` #347 (these will be removed in v10.0.0)
### Changes
- Update npm metadata for `primer-css`, `primer-core`, `primer-product`, and `primer-marketing` #328
- Remove `HEAD` heading from the changelog #327
# 9.3.0
## Added

View File

@ -1,5 +1,5 @@
{
"version": "1.4.0",
"version": "1.5.0",
"name": "primer-alerts",
"description": "Flash messages, or alerts, inform users of successful or pending actions.",
"homepage": "http://primercss.io/",
@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"alerts",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-avatars",
"description": "Basic styles for user profile avatars.",
"homepage": "http://primercss.io/",
@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"avatars",

View File

@ -1,5 +1,5 @@
{
"version": "1.4.0",
"version": "1.5.0",
"name": "primer-base",
"description": "CSS to reset the browsers default styles",
"homepage": "http://primercss.io/",
@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-blankslate",
"description": "Blankslates are for when there is a lack of content within a page or section.",
"homepage": "http://primercss.io/",
@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "2.4.0",
"version": "2.5.0",
"name": "primer-box",
"description": "A module for creating rounded-corner boxes with options for headers, lists, and footers.",
"homepage": "http://primercss.io/",
@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-breadcrumb",
"description": "Breadcrumb navigation for pages with parents / grandparents.",
"homepage": "http://primercss.io/",
@ -28,7 +28,8 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-marketing-support": "1.3.0",
"primer-support": "4.4.0"
},
"keywords": [
"breadcrumb",

View File

@ -245,6 +245,25 @@ Use `.hidden-text-expander` to indicate and toggle hidden text.
You can also make the expander appear inline by adding `.inline`.
#### Using button styles with the details summary element
You can add `.btn` and `.btn-*` classes to any
[`<summary>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary)
element so that it gains the appearance of a button, and
selected/active styles when the parent
[`<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details)
element is open.
```html
<details>
<summary class="btn btn-block btn-primary">Toggle the content</summary>
<p class="mt-2">
This content will be toggled.
</p>
</details>
```
<!-- %enddocs -->
## License

View File

@ -1,5 +1,5 @@
{
"version": "2.3.0",
"version": "2.4.0",
"name": "primer-buttons",
"description": "A collection of buttons used for primary and secondary actions.",
"homepage": "http://primercss.io/",
@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "0.4.1",
"version": "0.5.0",
"name": "primer-cards",
"description": "Card-like containers to group semantically related content together on marketing websites at GitHub.",
"homepage": "http://primercss.io/",
@ -28,7 +28,7 @@
},
"dependencies": {
"primer-marketing-support": "1.3.0",
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"cards",

View File

@ -1,5 +1,5 @@
{
"version": "6.3.1",
"version": "6.4.0",
"name": "primer-core",
"description": "Primer CSS's core modules",
"homepage": "http://primercss.io/",
@ -26,17 +26,16 @@
"lint": "../../script/lint-scss"
},
"dependencies": {
"primer-base": "1.4.0",
"primer-box": "2.4.0",
"primer-breadcrumb": "1.3.0",
"primer-buttons": "2.3.0",
"primer-forms": "1.3.1",
"primer-layout": "1.3.0",
"primer-navigation": "1.3.0",
"primer-support": "4.3.0",
"primer-table-object": "1.3.0",
"primer-tooltips": "1.3.0",
"primer-truncate": "1.3.0",
"primer-utilities": "4.7.0"
"primer-base": "1.5.0",
"primer-box": "2.5.0",
"primer-buttons": "2.4.0",
"primer-forms": "1.4.0",
"primer-layout": "1.4.0",
"primer-navigation": "1.4.0",
"primer-support": "4.4.0",
"primer-table-object": "1.4.0",
"primer-tooltips": "1.4.0",
"primer-truncate": "1.4.0",
"primer-utilities": "4.8.0"
}
}

View File

@ -1,5 +1,5 @@
{
"version": "9.4.0",
"version": "9.5.0",
"name": "primer-css",
"description": "Primer is the CSS framework that powers GitHub's front-end design. Primer-css includes 23 packages that are grouped into 3 core meta-packages for easy install. Each package and meta-package is independently versioned and distributed via npm, so it's easy to include all or part of Primer within your own project.",
"homepage": "http://primercss.io/",
@ -27,34 +27,33 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-alerts": "1.4.0",
"primer-avatars": "1.3.0",
"primer-base": "1.4.0",
"primer-blankslate": "1.3.0",
"primer-box": "2.4.0",
"primer-breadcrumb": "1.3.0",
"primer-buttons": "2.3.0",
"primer-cards": "0.4.1",
"primer-core": "6.3.1",
"primer-dropdown": "0.1.0",
"primer-forms": "1.3.1",
"primer-labels": "1.4.0",
"primer-layout": "1.3.0",
"primer-markdown": "3.6.0",
"primer-marketing": "5.3.1",
"primer-alerts": "1.5.0",
"primer-avatars": "1.4.0",
"primer-base": "1.5.0",
"primer-blankslate": "1.4.0",
"primer-box": "2.5.0",
"primer-breadcrumb": "1.4.0",
"primer-buttons": "2.4.0",
"primer-cards": "0.5.0",
"primer-core": "6.4.0",
"primer-forms": "1.4.0",
"primer-labels": "1.5.0",
"primer-layout": "1.4.0",
"primer-markdown": "3.7.0",
"primer-marketing": "5.4.0",
"primer-marketing-support": "1.3.0",
"primer-marketing-type": "1.3.0",
"primer-marketing-utilities": "1.3.0",
"primer-navigation": "1.3.0",
"primer-page-headers": "1.3.0",
"primer-page-sections": "1.3.0",
"primer-product": "5.3.1",
"primer-support": "4.3.0",
"primer-table-object": "1.3.0",
"primer-tables": "1.3.0",
"primer-tooltips": "1.3.0",
"primer-truncate": "1.3.0",
"primer-utilities": "4.7.0"
"primer-marketing-type": "1.4.0",
"primer-marketing-utilities": "1.4.0",
"primer-navigation": "1.4.0",
"primer-page-headers": "1.4.0",
"primer-page-sections": "1.4.0",
"primer-product": "5.4.0",
"primer-support": "4.4.0",
"primer-table-object": "1.4.0",
"primer-tables": "1.4.0",
"primer-tooltips": "1.4.0",
"primer-truncate": "1.4.0",
"primer-utilities": "4.8.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.1",
"version": "1.4.0",
"name": "primer-forms",
"description": "Style individual form controls and utilize common layouts.",
"homepage": "http://primercss.io/",
@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "1.4.0",
"version": "1.5.0",
"name": "primer-labels",
"description": "Labels add metatdata or indicate status of items and navigational elements.",
"homepage": "http://primercss.io/",
@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-layout",
"description": "Containers, rows, and columns for creating page layout.",
"homepage": "http://primercss.io/",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "3.6.0",
"version": "3.7.0",
"name": "primer-markdown",
"description": "GitHub stylesheets for rendering markdown.",
"homepage": "https://github.com/primer/primer-markdown",
@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"github",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-marketing-type",
"description": "Typography for marketing websites at GitHub",
"homepage": "http://primercss.io/",
@ -29,7 +29,7 @@
},
"dependencies": {
"primer-marketing-support": "1.3.0",
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"css",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-marketing-utilities",
"description": "Marketing specific immutable, atomic CSS classes",
"homepage": "http://primercss.io/",
@ -29,7 +29,7 @@
},
"dependencies": {
"primer-marketing-support": "1.3.0",
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "5.3.1",
"version": "5.4.0",
"name": "primer-marketing",
"description": "Primer CSS marketing packages",
"homepage": "http://primercss.io/",
@ -26,14 +26,14 @@
"lint": "../../script/lint-scss"
},
"dependencies": {
"primer-breadcrumb": "1.3.0",
"primer-cards": "0.4.1",
"primer-breadcrumb": "1.4.0",
"primer-cards": "0.5.0",
"primer-marketing-support": "1.3.0",
"primer-marketing-type": "1.3.0",
"primer-marketing-utilities": "1.3.0",
"primer-page-headers": "1.3.0",
"primer-page-sections": "1.3.0",
"primer-support": "4.3.0",
"primer-tables": "1.3.0"
"primer-marketing-type": "1.4.0",
"primer-marketing-utilities": "1.4.0",
"primer-page-headers": "1.4.0",
"primer-page-sections": "1.4.0",
"primer-support": "4.4.0",
"primer-tables": "1.4.0"
}
}

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-navigation",
"description": "Singular purpose and flexible navigation elements.",
"homepage": "http://primercss.io/",
@ -27,7 +27,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-page-headers",
"description": "Jumbotrons, heroes, and featured content sections for marketing websites at GitHub.",
"homepage": "http://primercss.io/",
@ -28,7 +28,7 @@
},
"dependencies": {
"primer-marketing-support": "1.3.0",
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"css",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-page-sections",
"description": "Styles to create distinct sections of marketing pages at GitHub.",
"homepage": "http://primercss.io/",
@ -28,7 +28,7 @@
},
"dependencies": {
"primer-marketing-support": "1.3.0",
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"css",

View File

@ -1,5 +1,5 @@
{
"version": "5.3.1",
"version": "5.4.0",
"name": "primer-product",
"description": "Primer CSS's product modules",
"homepage": "http://primercss.io/",
@ -26,12 +26,11 @@
"lint": "../../script/lint-scss"
},
"dependencies": {
"primer-alerts": "1.4.0",
"primer-avatars": "1.3.0",
"primer-blankslate": "1.3.0",
"primer-dropdown": "0.1.0",
"primer-labels": "1.4.0",
"primer-markdown": "3.6.0",
"primer-support": "4.3.0"
"primer-alerts": "1.5.0",
"primer-avatars": "1.4.0",
"primer-blankslate": "1.4.0",
"primer-labels": "1.5.0",
"primer-markdown": "3.7.0",
"primer-support": "4.4.0"
}
}

View File

@ -23,7 +23,8 @@
}
&:active,
&.selected {
&.selected,
[open] > & {
background-color: darken(desaturate($bg, 10%), 6%);
background-image: none;
border-color: rgba($black, 0.35); // repeat to avoid shift on click-drag off of button
@ -54,7 +55,8 @@
}
&:active,
&.selected {
&.selected,
[open] > & {
background-color: darken(mix($bg, $bg2, 50%), 7%);
background-image: none;
border-color: $black-fade-50; // repeat to avoid shift on click-drag off of button
@ -99,7 +101,8 @@
}
&:active,
&.selected {
&.selected,
[open] > & {
color: $text-white;
background-color: darken($color, 5%);
background-image: none;
@ -129,7 +132,8 @@
&:hover,
&:active,
&.selected {
&.selected,
[open] > & {
color: $bg-color;
background-color: $text-color;
background-image: none;

View File

@ -1,5 +1,5 @@
{
"version": "4.3.0",
"version": "4.4.0",
"name": "primer-support",
"description": "Sass variables, mixins, and functions for use in our components.",
"homepage": "http://primercss.io/",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-table-object",
"description": "A module for creating dynamically resizable elements that always sit on the same horizontal line.",
"homepage": "http://primercss.io/",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-tables",
"description": "Styles to display tabular data for marketing websites at GitHub.",
"homepage": "http://primercss.io/",
@ -28,7 +28,7 @@
},
"dependencies": {
"primer-marketing-support": "1.3.0",
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"css",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-tooltips",
"description": "Add tooltips built entirely in CSS to nearly any element.",
"homepage": "http://primercss.io/",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "1.3.0",
"version": "1.4.0",
"name": "primer-truncate",
"description": "Shorten text with an ellipsis.",
"homepage": "http://primercss.io/",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint test-docs"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

View File

@ -1,5 +1,5 @@
{
"version": "4.7.0",
"version": "4.8.0",
"name": "primer-utilities",
"description": "Immutable, atomic CSS classes to rapidly build product",
"homepage": "http://primercss.io/",
@ -28,7 +28,7 @@
"test": "../../script/npm-run-all build lint"
},
"dependencies": {
"primer-support": "4.3.0"
"primer-support": "4.4.0"
},
"keywords": [
"primer",

44
script/bump-rc Executable file
View File

@ -0,0 +1,44 @@
#!/bin/bash
set -e
package="$1"
npm_tag=rc
semver=$(npm bin)/semver
bold=$(tput bold)
normal=$(tput sgr0)
pushd modules/$package > /dev/null
# get the version we're publishing as a release candidate
local_version=$(jq -r .version package.json)
echo "Bumping $package@${local_version}"
if [[ $local_version =~ "-" ]]; then
echo "❌ Found pre-release version: $package@$local_version; bailing!"
exit 1
fi
# find the *greatest* published prerelease
rc_prefix="$local_version-rc"
rc_version=$(
npm info "$package@$npm_tag" --json \
| jq -r '.versions[]' \
| grep "^${rc_prefix/./\.}" \
| tail -1
)
# if there isn't one, use the current local version
if [[ "$rc_version" == "" ]]; then
echo " 🤷‍♀️ no published RC; using ${bold}${local_version}${normal}"
rc_version="$local_version-rc.0"
else
echo " 📰 published RC: ${bold}${rc_version}${normal}"
fi
# increment by the tagged prerelease id
next_version=$(
$semver -i prerelease --preid $npm_tag "$rc_version"
)
bumped=$(npm version --no-git "$next_version")
echo " ➡️ ${bold}${bumped}${normal}"
popd > /dev/null

View File

@ -2,57 +2,16 @@
set -e
echo "👌 Publishing release candidate..."
package=primer-css
npm_tag=rc
# get the version we're publishing as a release candidate
local_version=$(jq -r .version modules/$package/package.json)
if [[ $local_version =~ "-" ]]; then
echo "❌ Found pre-release version: $package@$local_version; bailing!"
exit 1
else
echo "🏔 Local version: $package@$local_version"
fi
# get the version most recently published to the rc dist-tag
rc_version=$(npm info $package@$npm_tag version)
echo "📦 Published version for $package@$npm_tag: $rc_version"
rc_release=${rc_version%-*}
if [[ $local_version != $rc_release ]]; then
rc_version=$local_version
fi
# determine the
next_version=$(
$(npm bin)/semver --increment prerelease --preid $npm_tag $rc_version
)
echo "🤜 Next version: $package@$next_version"
# strip the pre-release version, yielding just major.minor.patch
pre_version=${next_version:${#local_version}}
echo " Prerelease suffix: '$pre_version'"
# if this is the same version, we need to bump the prerelease
# for all of the modules using the same prerelease identifier
echo "Updating all module versions in place..."
echo
module_dirs=modules/primer-*
module_dirs=modules/*primer*
for module_dir in $module_dirs; do
pushd $module_dir > /dev/null
module=$(basename $module_dir)
# determine the local version (in git)
module_version=$(jq -r .version package.json)
# strip the rc version, just in case
module_version=${module_version%-*}
module_next_version="$module_version$pre_version"
echo "$module@$module_version => $module_next_version"
# "upgrade" to the most recent RC version so that
# `npm version prerelease` can increment automatically
npm version --no-git --quiet "$module_next_version"
popd > /dev/null
$(dirname $0)/bump-rc $module
done
# publish all the things!