From d1deaba4c586aa9af99c20de27612d7537f6aa65 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Sat, 11 Nov 2017 13:19:12 -0500 Subject: [PATCH 1/9] Combine sides and sizes for rounded utilities, like we do with border width --- __tests__/fixtures/tailwind-output.css | 510 ++++++++++++++++++++++--- src/generators/rounded.js | 41 +- 2 files changed, 474 insertions(+), 77 deletions(-) diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css index 0714f376a6ca..3f69218b9e54 100644 --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -2116,42 +2116,122 @@ button, border-radius: .25rem; } +.rounded-t { + border-top-right-radius: .25rem; + border-top-left-radius: .25rem; +} + +.rounded-r { + border-top-right-radius: .25rem; + border-bottom-right-radius: .25rem; +} + +.rounded-b { + border-bottom-right-radius: .25rem; + border-bottom-left-radius: .25rem; +} + +.rounded-l { + border-top-left-radius: .25rem; + border-bottom-left-radius: .25rem; +} + .rounded-sm { border-radius: .125rem; } +.rounded-t-sm { + border-top-right-radius: .125rem; + border-top-left-radius: .125rem; +} + +.rounded-r-sm { + border-top-right-radius: .125rem; + border-bottom-right-radius: .125rem; +} + +.rounded-b-sm { + border-bottom-right-radius: .125rem; + border-bottom-left-radius: .125rem; +} + +.rounded-l-sm { + border-top-left-radius: .125rem; + border-bottom-left-radius: .125rem; +} + .rounded-lg { border-radius: .5rem; } +.rounded-t-lg { + border-top-right-radius: .5rem; + border-top-left-radius: .5rem; +} + +.rounded-r-lg { + border-top-right-radius: .5rem; + border-bottom-right-radius: .5rem; +} + +.rounded-b-lg { + border-bottom-right-radius: .5rem; + border-bottom-left-radius: .5rem; +} + +.rounded-l-lg { + border-top-left-radius: .5rem; + border-bottom-left-radius: .5rem; +} + .rounded-full { border-radius: 9999px; } -.rounded-none { - border-radius: 0; +.rounded-t-full { + border-top-right-radius: 9999px; + border-top-left-radius: 9999px; } -.rounded-t { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; +.rounded-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; } -.rounded-r { - border-bottom-left-radius: 0; - border-top-left-radius: 0; +.rounded-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; } -.rounded-b { - border-top-left-radius: 0; +.rounded-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; +} + +.rounded-none { + border-radius: 0; +} + +.rounded-t-none { border-top-right-radius: 0; + border-top-left-radius: 0; } -.rounded-l { +.rounded-r-none { border-top-right-radius: 0; border-bottom-right-radius: 0; } +.rounded-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.rounded-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + .block { display: block; } @@ -5076,42 +5156,122 @@ button, border-radius: .25rem; } + .sm\:rounded-t { + border-top-right-radius: .25rem; + border-top-left-radius: .25rem; + } + + .sm\:rounded-r { + border-top-right-radius: .25rem; + border-bottom-right-radius: .25rem; + } + + .sm\:rounded-b { + border-bottom-right-radius: .25rem; + border-bottom-left-radius: .25rem; + } + + .sm\:rounded-l { + border-top-left-radius: .25rem; + border-bottom-left-radius: .25rem; + } + .sm\:rounded-sm { border-radius: .125rem; } + .sm\:rounded-t-sm { + border-top-right-radius: .125rem; + border-top-left-radius: .125rem; + } + + .sm\:rounded-r-sm { + border-top-right-radius: .125rem; + border-bottom-right-radius: .125rem; + } + + .sm\:rounded-b-sm { + border-bottom-right-radius: .125rem; + border-bottom-left-radius: .125rem; + } + + .sm\:rounded-l-sm { + border-top-left-radius: .125rem; + border-bottom-left-radius: .125rem; + } + .sm\:rounded-lg { border-radius: .5rem; } + .sm\:rounded-t-lg { + border-top-right-radius: .5rem; + border-top-left-radius: .5rem; + } + + .sm\:rounded-r-lg { + border-top-right-radius: .5rem; + border-bottom-right-radius: .5rem; + } + + .sm\:rounded-b-lg { + border-bottom-right-radius: .5rem; + border-bottom-left-radius: .5rem; + } + + .sm\:rounded-l-lg { + border-top-left-radius: .5rem; + border-bottom-left-radius: .5rem; + } + .sm\:rounded-full { border-radius: 9999px; } - .sm\:rounded-none { - border-radius: 0; + .sm\:rounded-t-full { + border-top-right-radius: 9999px; + border-top-left-radius: 9999px; } - .sm\:rounded-t { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; + .sm\:rounded-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; } - .sm\:rounded-r { - border-bottom-left-radius: 0; - border-top-left-radius: 0; + .sm\:rounded-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; } - .sm\:rounded-b { - border-top-left-radius: 0; + .sm\:rounded-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .sm\:rounded-none { + border-radius: 0; + } + + .sm\:rounded-t-none { border-top-right-radius: 0; + border-top-left-radius: 0; } - .sm\:rounded-l { + .sm\:rounded-r-none { border-top-right-radius: 0; border-bottom-right-radius: 0; } + .sm\:rounded-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .sm\:rounded-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .sm\:block { display: block; } @@ -8037,42 +8197,122 @@ button, border-radius: .25rem; } + .md\:rounded-t { + border-top-right-radius: .25rem; + border-top-left-radius: .25rem; + } + + .md\:rounded-r { + border-top-right-radius: .25rem; + border-bottom-right-radius: .25rem; + } + + .md\:rounded-b { + border-bottom-right-radius: .25rem; + border-bottom-left-radius: .25rem; + } + + .md\:rounded-l { + border-top-left-radius: .25rem; + border-bottom-left-radius: .25rem; + } + .md\:rounded-sm { border-radius: .125rem; } + .md\:rounded-t-sm { + border-top-right-radius: .125rem; + border-top-left-radius: .125rem; + } + + .md\:rounded-r-sm { + border-top-right-radius: .125rem; + border-bottom-right-radius: .125rem; + } + + .md\:rounded-b-sm { + border-bottom-right-radius: .125rem; + border-bottom-left-radius: .125rem; + } + + .md\:rounded-l-sm { + border-top-left-radius: .125rem; + border-bottom-left-radius: .125rem; + } + .md\:rounded-lg { border-radius: .5rem; } + .md\:rounded-t-lg { + border-top-right-radius: .5rem; + border-top-left-radius: .5rem; + } + + .md\:rounded-r-lg { + border-top-right-radius: .5rem; + border-bottom-right-radius: .5rem; + } + + .md\:rounded-b-lg { + border-bottom-right-radius: .5rem; + border-bottom-left-radius: .5rem; + } + + .md\:rounded-l-lg { + border-top-left-radius: .5rem; + border-bottom-left-radius: .5rem; + } + .md\:rounded-full { border-radius: 9999px; } - .md\:rounded-none { - border-radius: 0; + .md\:rounded-t-full { + border-top-right-radius: 9999px; + border-top-left-radius: 9999px; } - .md\:rounded-t { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; + .md\:rounded-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; } - .md\:rounded-r { - border-bottom-left-radius: 0; - border-top-left-radius: 0; + .md\:rounded-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; } - .md\:rounded-b { - border-top-left-radius: 0; + .md\:rounded-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .md\:rounded-none { + border-radius: 0; + } + + .md\:rounded-t-none { border-top-right-radius: 0; + border-top-left-radius: 0; } - .md\:rounded-l { + .md\:rounded-r-none { border-top-right-radius: 0; border-bottom-right-radius: 0; } + .md\:rounded-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .md\:rounded-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .md\:block { display: block; } @@ -10998,42 +11238,122 @@ button, border-radius: .25rem; } + .lg\:rounded-t { + border-top-right-radius: .25rem; + border-top-left-radius: .25rem; + } + + .lg\:rounded-r { + border-top-right-radius: .25rem; + border-bottom-right-radius: .25rem; + } + + .lg\:rounded-b { + border-bottom-right-radius: .25rem; + border-bottom-left-radius: .25rem; + } + + .lg\:rounded-l { + border-top-left-radius: .25rem; + border-bottom-left-radius: .25rem; + } + .lg\:rounded-sm { border-radius: .125rem; } + .lg\:rounded-t-sm { + border-top-right-radius: .125rem; + border-top-left-radius: .125rem; + } + + .lg\:rounded-r-sm { + border-top-right-radius: .125rem; + border-bottom-right-radius: .125rem; + } + + .lg\:rounded-b-sm { + border-bottom-right-radius: .125rem; + border-bottom-left-radius: .125rem; + } + + .lg\:rounded-l-sm { + border-top-left-radius: .125rem; + border-bottom-left-radius: .125rem; + } + .lg\:rounded-lg { border-radius: .5rem; } + .lg\:rounded-t-lg { + border-top-right-radius: .5rem; + border-top-left-radius: .5rem; + } + + .lg\:rounded-r-lg { + border-top-right-radius: .5rem; + border-bottom-right-radius: .5rem; + } + + .lg\:rounded-b-lg { + border-bottom-right-radius: .5rem; + border-bottom-left-radius: .5rem; + } + + .lg\:rounded-l-lg { + border-top-left-radius: .5rem; + border-bottom-left-radius: .5rem; + } + .lg\:rounded-full { border-radius: 9999px; } - .lg\:rounded-none { - border-radius: 0; + .lg\:rounded-t-full { + border-top-right-radius: 9999px; + border-top-left-radius: 9999px; } - .lg\:rounded-t { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; + .lg\:rounded-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; } - .lg\:rounded-r { - border-bottom-left-radius: 0; - border-top-left-radius: 0; + .lg\:rounded-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; } - .lg\:rounded-b { - border-top-left-radius: 0; + .lg\:rounded-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .lg\:rounded-none { + border-radius: 0; + } + + .lg\:rounded-t-none { border-top-right-radius: 0; + border-top-left-radius: 0; } - .lg\:rounded-l { + .lg\:rounded-r-none { border-top-right-radius: 0; border-bottom-right-radius: 0; } + .lg\:rounded-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .lg\:rounded-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .lg\:block { display: block; } @@ -13959,42 +14279,122 @@ button, border-radius: .25rem; } + .xl\:rounded-t { + border-top-right-radius: .25rem; + border-top-left-radius: .25rem; + } + + .xl\:rounded-r { + border-top-right-radius: .25rem; + border-bottom-right-radius: .25rem; + } + + .xl\:rounded-b { + border-bottom-right-radius: .25rem; + border-bottom-left-radius: .25rem; + } + + .xl\:rounded-l { + border-top-left-radius: .25rem; + border-bottom-left-radius: .25rem; + } + .xl\:rounded-sm { border-radius: .125rem; } + .xl\:rounded-t-sm { + border-top-right-radius: .125rem; + border-top-left-radius: .125rem; + } + + .xl\:rounded-r-sm { + border-top-right-radius: .125rem; + border-bottom-right-radius: .125rem; + } + + .xl\:rounded-b-sm { + border-bottom-right-radius: .125rem; + border-bottom-left-radius: .125rem; + } + + .xl\:rounded-l-sm { + border-top-left-radius: .125rem; + border-bottom-left-radius: .125rem; + } + .xl\:rounded-lg { border-radius: .5rem; } + .xl\:rounded-t-lg { + border-top-right-radius: .5rem; + border-top-left-radius: .5rem; + } + + .xl\:rounded-r-lg { + border-top-right-radius: .5rem; + border-bottom-right-radius: .5rem; + } + + .xl\:rounded-b-lg { + border-bottom-right-radius: .5rem; + border-bottom-left-radius: .5rem; + } + + .xl\:rounded-l-lg { + border-top-left-radius: .5rem; + border-bottom-left-radius: .5rem; + } + .xl\:rounded-full { border-radius: 9999px; } - .xl\:rounded-none { - border-radius: 0; + .xl\:rounded-t-full { + border-top-right-radius: 9999px; + border-top-left-radius: 9999px; } - .xl\:rounded-t { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; + .xl\:rounded-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; } - .xl\:rounded-r { - border-bottom-left-radius: 0; - border-top-left-radius: 0; + .xl\:rounded-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; } - .xl\:rounded-b { - border-top-left-radius: 0; + .xl\:rounded-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .xl\:rounded-none { + border-radius: 0; + } + + .xl\:rounded-t-none { border-top-right-radius: 0; + border-top-left-radius: 0; } - .xl\:rounded-l { + .xl\:rounded-r-none { border-top-right-radius: 0; border-bottom-right-radius: 0; } + .xl\:rounded-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .xl\:rounded-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .xl\:block { display: block; } diff --git a/src/generators/rounded.js b/src/generators/rounded.js index b251725a252f..f31d8031d90e 100644 --- a/src/generators/rounded.js +++ b/src/generators/rounded.js @@ -1,35 +1,32 @@ import _ from 'lodash' -import defineClass from '../util/defineClass' import defineClasses from '../util/defineClasses' -function sideVariants() { +function sizedBorder(radius, modifier) { + modifier = modifier === 'default' ? '' : `-${modifier}` + return defineClasses({ - 'rounded-t': { - 'border-bottom-right-radius': '0', - 'border-bottom-left-radius': '0', + [`rounded${modifier}`]: { + 'border-radius': `${radius}`, + }, + [`rounded-t${modifier}`]: { + 'border-top-right-radius': `${radius}`, + 'border-top-left-radius': `${radius}`, }, - 'rounded-r': { - 'border-bottom-left-radius': '0', - 'border-top-left-radius': '0', + [`rounded-r${modifier}`]: { + 'border-top-right-radius': `${radius}`, + 'border-bottom-right-radius': `${radius}`, }, - 'rounded-b': { - 'border-top-left-radius': '0', - 'border-top-right-radius': '0', + [`rounded-b${modifier}`]: { + 'border-bottom-right-radius': `${radius}`, + 'border-bottom-left-radius': `${radius}`, }, - 'rounded-l': { - 'border-top-right-radius': '0', - 'border-bottom-right-radius': '0', + [`rounded-l${modifier}`]: { + 'border-top-left-radius': `${radius}`, + 'border-bottom-left-radius': `${radius}`, }, }) } module.exports = function({ borderRadius }) { - return _(borderRadius) - .map((radius, modifier) => { - return defineClass(modifier === 'default' ? 'rounded' : `rounded-${modifier}`, { - 'border-radius': radius, - }) - }) - .concat(sideVariants()) - .value() + return _.flatMap(borderRadius, sizedBorder) } From 924986f7ec9adb22c9bbe7a2200b704509f64fb7 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Mon, 13 Nov 2017 12:13:00 -0500 Subject: [PATCH 2/9] Switch rounded to radius, target corners instead of sides --- __tests__/fixtures/tailwind-output.css | 550 ++++++++++--------------- defaultConfig.js | 6 +- src/generators/rounded.js | 16 +- 3 files changed, 233 insertions(+), 339 deletions(-) diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css index 3f69218b9e54..ebb717f97b9d 100644 --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -2112,124 +2112,104 @@ button, border-style: none; } -.rounded { - border-radius: .25rem; +.radius-none { + border-radius: 0; } -.rounded-t { - border-top-right-radius: .25rem; - border-top-left-radius: .25rem; +.radius-tr-none { + border-top-right-radius: 0; } -.rounded-r { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; +.radius-br-none { + border-bottom-right-radius: 0; } -.rounded-b { - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; +.radius-bl-none { + border-bottom-left-radius: 0; } -.rounded-l { - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; +.radius-tl-none { + border-top-left-radius: 0; } -.rounded-sm { +.radius-sm { border-radius: .125rem; } -.rounded-t-sm { +.radius-tr-sm { border-top-right-radius: .125rem; - border-top-left-radius: .125rem; } -.rounded-r-sm { - border-top-right-radius: .125rem; +.radius-br-sm { border-bottom-right-radius: .125rem; } -.rounded-b-sm { - border-bottom-right-radius: .125rem; +.radius-bl-sm { border-bottom-left-radius: .125rem; } -.rounded-l-sm { +.radius-tl-sm { border-top-left-radius: .125rem; - border-bottom-left-radius: .125rem; } -.rounded-lg { - border-radius: .5rem; +.radius-md { + border-radius: .25rem; } -.rounded-t-lg { - border-top-right-radius: .5rem; - border-top-left-radius: .5rem; +.radius-tr-md { + border-top-right-radius: .25rem; } -.rounded-r-lg { - border-top-right-radius: .5rem; - border-bottom-right-radius: .5rem; +.radius-br-md { + border-bottom-right-radius: .25rem; } -.rounded-b-lg { - border-bottom-right-radius: .5rem; - border-bottom-left-radius: .5rem; +.radius-bl-md { + border-bottom-left-radius: .25rem; } -.rounded-l-lg { - border-top-left-radius: .5rem; - border-bottom-left-radius: .5rem; +.radius-tl-md { + border-top-left-radius: .25rem; } -.rounded-full { - border-radius: 9999px; +.radius-lg { + border-radius: .5rem; } -.rounded-t-full { - border-top-right-radius: 9999px; - border-top-left-radius: 9999px; +.radius-tr-lg { + border-top-right-radius: .5rem; } -.rounded-r-full { - border-top-right-radius: 9999px; - border-bottom-right-radius: 9999px; +.radius-br-lg { + border-bottom-right-radius: .5rem; } -.rounded-b-full { - border-bottom-right-radius: 9999px; - border-bottom-left-radius: 9999px; +.radius-bl-lg { + border-bottom-left-radius: .5rem; } -.rounded-l-full { - border-top-left-radius: 9999px; - border-bottom-left-radius: 9999px; +.radius-tl-lg { + border-top-left-radius: .5rem; } -.rounded-none { - border-radius: 0; +.radius-full { + border-radius: 9999px; } -.rounded-t-none { - border-top-right-radius: 0; - border-top-left-radius: 0; +.radius-tr-full { + border-top-right-radius: 9999px; } -.rounded-r-none { - border-top-right-radius: 0; - border-bottom-right-radius: 0; +.radius-br-full { + border-bottom-right-radius: 9999px; } -.rounded-b-none { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; +.radius-bl-full { + border-bottom-left-radius: 9999px; } -.rounded-l-none { - border-top-left-radius: 0; - border-bottom-left-radius: 0; +.radius-tl-full { + border-top-left-radius: 9999px; } .block { @@ -5152,124 +5132,104 @@ button, border-style: none; } - .sm\:rounded { - border-radius: .25rem; + .sm\:radius-none { + border-radius: 0; } - .sm\:rounded-t { - border-top-right-radius: .25rem; - border-top-left-radius: .25rem; + .sm\:radius-tr-none { + border-top-right-radius: 0; } - .sm\:rounded-r { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; + .sm\:radius-br-none { + border-bottom-right-radius: 0; } - .sm\:rounded-b { - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; + .sm\:radius-bl-none { + border-bottom-left-radius: 0; } - .sm\:rounded-l { - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; + .sm\:radius-tl-none { + border-top-left-radius: 0; } - .sm\:rounded-sm { + .sm\:radius-sm { border-radius: .125rem; } - .sm\:rounded-t-sm { + .sm\:radius-tr-sm { border-top-right-radius: .125rem; - border-top-left-radius: .125rem; } - .sm\:rounded-r-sm { - border-top-right-radius: .125rem; + .sm\:radius-br-sm { border-bottom-right-radius: .125rem; } - .sm\:rounded-b-sm { - border-bottom-right-radius: .125rem; + .sm\:radius-bl-sm { border-bottom-left-radius: .125rem; } - .sm\:rounded-l-sm { + .sm\:radius-tl-sm { border-top-left-radius: .125rem; - border-bottom-left-radius: .125rem; } - .sm\:rounded-lg { - border-radius: .5rem; + .sm\:radius-md { + border-radius: .25rem; } - .sm\:rounded-t-lg { - border-top-right-radius: .5rem; - border-top-left-radius: .5rem; + .sm\:radius-tr-md { + border-top-right-radius: .25rem; } - .sm\:rounded-r-lg { - border-top-right-radius: .5rem; - border-bottom-right-radius: .5rem; + .sm\:radius-br-md { + border-bottom-right-radius: .25rem; } - .sm\:rounded-b-lg { - border-bottom-right-radius: .5rem; - border-bottom-left-radius: .5rem; + .sm\:radius-bl-md { + border-bottom-left-radius: .25rem; } - .sm\:rounded-l-lg { - border-top-left-radius: .5rem; - border-bottom-left-radius: .5rem; + .sm\:radius-tl-md { + border-top-left-radius: .25rem; } - .sm\:rounded-full { - border-radius: 9999px; + .sm\:radius-lg { + border-radius: .5rem; } - .sm\:rounded-t-full { - border-top-right-radius: 9999px; - border-top-left-radius: 9999px; + .sm\:radius-tr-lg { + border-top-right-radius: .5rem; } - .sm\:rounded-r-full { - border-top-right-radius: 9999px; - border-bottom-right-radius: 9999px; + .sm\:radius-br-lg { + border-bottom-right-radius: .5rem; } - .sm\:rounded-b-full { - border-bottom-right-radius: 9999px; - border-bottom-left-radius: 9999px; + .sm\:radius-bl-lg { + border-bottom-left-radius: .5rem; } - .sm\:rounded-l-full { - border-top-left-radius: 9999px; - border-bottom-left-radius: 9999px; + .sm\:radius-tl-lg { + border-top-left-radius: .5rem; } - .sm\:rounded-none { - border-radius: 0; + .sm\:radius-full { + border-radius: 9999px; } - .sm\:rounded-t-none { - border-top-right-radius: 0; - border-top-left-radius: 0; + .sm\:radius-tr-full { + border-top-right-radius: 9999px; } - .sm\:rounded-r-none { - border-top-right-radius: 0; - border-bottom-right-radius: 0; + .sm\:radius-br-full { + border-bottom-right-radius: 9999px; } - .sm\:rounded-b-none { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; + .sm\:radius-bl-full { + border-bottom-left-radius: 9999px; } - .sm\:rounded-l-none { - border-top-left-radius: 0; - border-bottom-left-radius: 0; + .sm\:radius-tl-full { + border-top-left-radius: 9999px; } .sm\:block { @@ -8193,124 +8153,104 @@ button, border-style: none; } - .md\:rounded { - border-radius: .25rem; + .md\:radius-none { + border-radius: 0; } - .md\:rounded-t { - border-top-right-radius: .25rem; - border-top-left-radius: .25rem; + .md\:radius-tr-none { + border-top-right-radius: 0; } - .md\:rounded-r { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; + .md\:radius-br-none { + border-bottom-right-radius: 0; } - .md\:rounded-b { - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; + .md\:radius-bl-none { + border-bottom-left-radius: 0; } - .md\:rounded-l { - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; + .md\:radius-tl-none { + border-top-left-radius: 0; } - .md\:rounded-sm { + .md\:radius-sm { border-radius: .125rem; } - .md\:rounded-t-sm { + .md\:radius-tr-sm { border-top-right-radius: .125rem; - border-top-left-radius: .125rem; } - .md\:rounded-r-sm { - border-top-right-radius: .125rem; + .md\:radius-br-sm { border-bottom-right-radius: .125rem; } - .md\:rounded-b-sm { - border-bottom-right-radius: .125rem; + .md\:radius-bl-sm { border-bottom-left-radius: .125rem; } - .md\:rounded-l-sm { + .md\:radius-tl-sm { border-top-left-radius: .125rem; - border-bottom-left-radius: .125rem; } - .md\:rounded-lg { - border-radius: .5rem; + .md\:radius-md { + border-radius: .25rem; } - .md\:rounded-t-lg { - border-top-right-radius: .5rem; - border-top-left-radius: .5rem; + .md\:radius-tr-md { + border-top-right-radius: .25rem; } - .md\:rounded-r-lg { - border-top-right-radius: .5rem; - border-bottom-right-radius: .5rem; + .md\:radius-br-md { + border-bottom-right-radius: .25rem; } - .md\:rounded-b-lg { - border-bottom-right-radius: .5rem; - border-bottom-left-radius: .5rem; + .md\:radius-bl-md { + border-bottom-left-radius: .25rem; } - .md\:rounded-l-lg { - border-top-left-radius: .5rem; - border-bottom-left-radius: .5rem; + .md\:radius-tl-md { + border-top-left-radius: .25rem; } - .md\:rounded-full { - border-radius: 9999px; + .md\:radius-lg { + border-radius: .5rem; } - .md\:rounded-t-full { - border-top-right-radius: 9999px; - border-top-left-radius: 9999px; + .md\:radius-tr-lg { + border-top-right-radius: .5rem; } - .md\:rounded-r-full { - border-top-right-radius: 9999px; - border-bottom-right-radius: 9999px; + .md\:radius-br-lg { + border-bottom-right-radius: .5rem; } - .md\:rounded-b-full { - border-bottom-right-radius: 9999px; - border-bottom-left-radius: 9999px; + .md\:radius-bl-lg { + border-bottom-left-radius: .5rem; } - .md\:rounded-l-full { - border-top-left-radius: 9999px; - border-bottom-left-radius: 9999px; + .md\:radius-tl-lg { + border-top-left-radius: .5rem; } - .md\:rounded-none { - border-radius: 0; + .md\:radius-full { + border-radius: 9999px; } - .md\:rounded-t-none { - border-top-right-radius: 0; - border-top-left-radius: 0; + .md\:radius-tr-full { + border-top-right-radius: 9999px; } - .md\:rounded-r-none { - border-top-right-radius: 0; - border-bottom-right-radius: 0; + .md\:radius-br-full { + border-bottom-right-radius: 9999px; } - .md\:rounded-b-none { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; + .md\:radius-bl-full { + border-bottom-left-radius: 9999px; } - .md\:rounded-l-none { - border-top-left-radius: 0; - border-bottom-left-radius: 0; + .md\:radius-tl-full { + border-top-left-radius: 9999px; } .md\:block { @@ -11234,124 +11174,104 @@ button, border-style: none; } - .lg\:rounded { - border-radius: .25rem; + .lg\:radius-none { + border-radius: 0; } - .lg\:rounded-t { - border-top-right-radius: .25rem; - border-top-left-radius: .25rem; + .lg\:radius-tr-none { + border-top-right-radius: 0; } - .lg\:rounded-r { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; + .lg\:radius-br-none { + border-bottom-right-radius: 0; } - .lg\:rounded-b { - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; + .lg\:radius-bl-none { + border-bottom-left-radius: 0; } - .lg\:rounded-l { - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; + .lg\:radius-tl-none { + border-top-left-radius: 0; } - .lg\:rounded-sm { + .lg\:radius-sm { border-radius: .125rem; } - .lg\:rounded-t-sm { + .lg\:radius-tr-sm { border-top-right-radius: .125rem; - border-top-left-radius: .125rem; } - .lg\:rounded-r-sm { - border-top-right-radius: .125rem; + .lg\:radius-br-sm { border-bottom-right-radius: .125rem; } - .lg\:rounded-b-sm { - border-bottom-right-radius: .125rem; + .lg\:radius-bl-sm { border-bottom-left-radius: .125rem; } - .lg\:rounded-l-sm { + .lg\:radius-tl-sm { border-top-left-radius: .125rem; - border-bottom-left-radius: .125rem; } - .lg\:rounded-lg { - border-radius: .5rem; + .lg\:radius-md { + border-radius: .25rem; } - .lg\:rounded-t-lg { - border-top-right-radius: .5rem; - border-top-left-radius: .5rem; + .lg\:radius-tr-md { + border-top-right-radius: .25rem; } - .lg\:rounded-r-lg { - border-top-right-radius: .5rem; - border-bottom-right-radius: .5rem; + .lg\:radius-br-md { + border-bottom-right-radius: .25rem; } - .lg\:rounded-b-lg { - border-bottom-right-radius: .5rem; - border-bottom-left-radius: .5rem; + .lg\:radius-bl-md { + border-bottom-left-radius: .25rem; } - .lg\:rounded-l-lg { - border-top-left-radius: .5rem; - border-bottom-left-radius: .5rem; + .lg\:radius-tl-md { + border-top-left-radius: .25rem; } - .lg\:rounded-full { - border-radius: 9999px; + .lg\:radius-lg { + border-radius: .5rem; } - .lg\:rounded-t-full { - border-top-right-radius: 9999px; - border-top-left-radius: 9999px; + .lg\:radius-tr-lg { + border-top-right-radius: .5rem; } - .lg\:rounded-r-full { - border-top-right-radius: 9999px; - border-bottom-right-radius: 9999px; + .lg\:radius-br-lg { + border-bottom-right-radius: .5rem; } - .lg\:rounded-b-full { - border-bottom-right-radius: 9999px; - border-bottom-left-radius: 9999px; + .lg\:radius-bl-lg { + border-bottom-left-radius: .5rem; } - .lg\:rounded-l-full { - border-top-left-radius: 9999px; - border-bottom-left-radius: 9999px; + .lg\:radius-tl-lg { + border-top-left-radius: .5rem; } - .lg\:rounded-none { - border-radius: 0; + .lg\:radius-full { + border-radius: 9999px; } - .lg\:rounded-t-none { - border-top-right-radius: 0; - border-top-left-radius: 0; + .lg\:radius-tr-full { + border-top-right-radius: 9999px; } - .lg\:rounded-r-none { - border-top-right-radius: 0; - border-bottom-right-radius: 0; + .lg\:radius-br-full { + border-bottom-right-radius: 9999px; } - .lg\:rounded-b-none { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; + .lg\:radius-bl-full { + border-bottom-left-radius: 9999px; } - .lg\:rounded-l-none { - border-top-left-radius: 0; - border-bottom-left-radius: 0; + .lg\:radius-tl-full { + border-top-left-radius: 9999px; } .lg\:block { @@ -14275,124 +14195,104 @@ button, border-style: none; } - .xl\:rounded { - border-radius: .25rem; + .xl\:radius-none { + border-radius: 0; } - .xl\:rounded-t { - border-top-right-radius: .25rem; - border-top-left-radius: .25rem; + .xl\:radius-tr-none { + border-top-right-radius: 0; } - .xl\:rounded-r { - border-top-right-radius: .25rem; - border-bottom-right-radius: .25rem; + .xl\:radius-br-none { + border-bottom-right-radius: 0; } - .xl\:rounded-b { - border-bottom-right-radius: .25rem; - border-bottom-left-radius: .25rem; + .xl\:radius-bl-none { + border-bottom-left-radius: 0; } - .xl\:rounded-l { - border-top-left-radius: .25rem; - border-bottom-left-radius: .25rem; + .xl\:radius-tl-none { + border-top-left-radius: 0; } - .xl\:rounded-sm { + .xl\:radius-sm { border-radius: .125rem; } - .xl\:rounded-t-sm { + .xl\:radius-tr-sm { border-top-right-radius: .125rem; - border-top-left-radius: .125rem; } - .xl\:rounded-r-sm { - border-top-right-radius: .125rem; + .xl\:radius-br-sm { border-bottom-right-radius: .125rem; } - .xl\:rounded-b-sm { - border-bottom-right-radius: .125rem; + .xl\:radius-bl-sm { border-bottom-left-radius: .125rem; } - .xl\:rounded-l-sm { + .xl\:radius-tl-sm { border-top-left-radius: .125rem; - border-bottom-left-radius: .125rem; } - .xl\:rounded-lg { - border-radius: .5rem; + .xl\:radius-md { + border-radius: .25rem; } - .xl\:rounded-t-lg { - border-top-right-radius: .5rem; - border-top-left-radius: .5rem; + .xl\:radius-tr-md { + border-top-right-radius: .25rem; } - .xl\:rounded-r-lg { - border-top-right-radius: .5rem; - border-bottom-right-radius: .5rem; + .xl\:radius-br-md { + border-bottom-right-radius: .25rem; } - .xl\:rounded-b-lg { - border-bottom-right-radius: .5rem; - border-bottom-left-radius: .5rem; + .xl\:radius-bl-md { + border-bottom-left-radius: .25rem; } - .xl\:rounded-l-lg { - border-top-left-radius: .5rem; - border-bottom-left-radius: .5rem; + .xl\:radius-tl-md { + border-top-left-radius: .25rem; } - .xl\:rounded-full { - border-radius: 9999px; + .xl\:radius-lg { + border-radius: .5rem; } - .xl\:rounded-t-full { - border-top-right-radius: 9999px; - border-top-left-radius: 9999px; + .xl\:radius-tr-lg { + border-top-right-radius: .5rem; } - .xl\:rounded-r-full { - border-top-right-radius: 9999px; - border-bottom-right-radius: 9999px; + .xl\:radius-br-lg { + border-bottom-right-radius: .5rem; } - .xl\:rounded-b-full { - border-bottom-right-radius: 9999px; - border-bottom-left-radius: 9999px; + .xl\:radius-bl-lg { + border-bottom-left-radius: .5rem; } - .xl\:rounded-l-full { - border-top-left-radius: 9999px; - border-bottom-left-radius: 9999px; + .xl\:radius-tl-lg { + border-top-left-radius: .5rem; } - .xl\:rounded-none { - border-radius: 0; + .xl\:radius-full { + border-radius: 9999px; } - .xl\:rounded-t-none { - border-top-right-radius: 0; - border-top-left-radius: 0; + .xl\:radius-tr-full { + border-top-right-radius: 9999px; } - .xl\:rounded-r-none { - border-top-right-radius: 0; - border-bottom-right-radius: 0; + .xl\:radius-br-full { + border-bottom-right-radius: 9999px; } - .xl\:rounded-b-none { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; + .xl\:radius-bl-full { + border-bottom-left-radius: 9999px; } - .xl\:rounded-l-none { - border-top-left-radius: 0; - border-bottom-left-radius: 0; + .xl\:radius-tl-full { + border-top-left-radius: 9999px; } .xl\:block { diff --git a/defaultConfig.js b/defaultConfig.js index 19154bcd7345..c263570bf8da 100644 --- a/defaultConfig.js +++ b/defaultConfig.js @@ -410,16 +410,16 @@ module.exports = { | is provided, it will be made available as the non-suffixed `.rounded` | utility. | - | Class name: .rounded{-radius?} + | Class name: .radius-{size} | */ borderRadius: { - default: '.25rem', + 'none': '0', 'sm': '.125rem', + 'md': '.25rem', 'lg': '.5rem', 'full': '9999px', - 'none': '0', }, diff --git a/src/generators/rounded.js b/src/generators/rounded.js index f31d8031d90e..0e6fd560f71c 100644 --- a/src/generators/rounded.js +++ b/src/generators/rounded.js @@ -2,27 +2,21 @@ import _ from 'lodash' import defineClasses from '../util/defineClasses' function sizedBorder(radius, modifier) { - modifier = modifier === 'default' ? '' : `-${modifier}` - return defineClasses({ - [`rounded${modifier}`]: { + [`radius-${modifier}`]: { 'border-radius': `${radius}`, }, - [`rounded-t${modifier}`]: { + [`radius-tr-${modifier}`]: { 'border-top-right-radius': `${radius}`, - 'border-top-left-radius': `${radius}`, }, - [`rounded-r${modifier}`]: { - 'border-top-right-radius': `${radius}`, + [`radius-br-${modifier}`]: { 'border-bottom-right-radius': `${radius}`, }, - [`rounded-b${modifier}`]: { - 'border-bottom-right-radius': `${radius}`, + [`radius-bl-${modifier}`]: { 'border-bottom-left-radius': `${radius}`, }, - [`rounded-l${modifier}`]: { + [`radius-tl-${modifier}`]: { 'border-top-left-radius': `${radius}`, - 'border-bottom-left-radius': `${radius}`, }, }) } From 5ef221cb64899fef99a36f8c1415f43aad12e4fa Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Mon, 13 Nov 2017 14:56:11 -0500 Subject: [PATCH 3/9] Reintroduce radius-{side} utilities --- __tests__/fixtures/tailwind-output.css | 500 +++++++++++++++++++++++++ src/generators/rounded.js | 16 + 2 files changed, 516 insertions(+) diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css index ebb717f97b9d..01f8a8bfbe88 100644 --- a/__tests__/fixtures/tailwind-output.css +++ b/__tests__/fixtures/tailwind-output.css @@ -2116,6 +2116,26 @@ button, border-radius: 0; } +.radius-t-none { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +.radius-r-none { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} + +.radius-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +.radius-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} + .radius-tr-none { border-top-right-radius: 0; } @@ -2136,6 +2156,26 @@ button, border-radius: .125rem; } +.radius-t-sm { + border-top-left-radius: .125rem; + border-top-right-radius: .125rem; +} + +.radius-r-sm { + border-top-right-radius: .125rem; + border-bottom-right-radius: .125rem; +} + +.radius-b-sm { + border-bottom-right-radius: .125rem; + border-bottom-left-radius: .125rem; +} + +.radius-l-sm { + border-top-left-radius: .125rem; + border-bottom-left-radius: .125rem; +} + .radius-tr-sm { border-top-right-radius: .125rem; } @@ -2156,6 +2196,26 @@ button, border-radius: .25rem; } +.radius-t-md { + border-top-left-radius: .25rem; + border-top-right-radius: .25rem; +} + +.radius-r-md { + border-top-right-radius: .25rem; + border-bottom-right-radius: .25rem; +} + +.radius-b-md { + border-bottom-right-radius: .25rem; + border-bottom-left-radius: .25rem; +} + +.radius-l-md { + border-top-left-radius: .25rem; + border-bottom-left-radius: .25rem; +} + .radius-tr-md { border-top-right-radius: .25rem; } @@ -2176,6 +2236,26 @@ button, border-radius: .5rem; } +.radius-t-lg { + border-top-left-radius: .5rem; + border-top-right-radius: .5rem; +} + +.radius-r-lg { + border-top-right-radius: .5rem; + border-bottom-right-radius: .5rem; +} + +.radius-b-lg { + border-bottom-right-radius: .5rem; + border-bottom-left-radius: .5rem; +} + +.radius-l-lg { + border-top-left-radius: .5rem; + border-bottom-left-radius: .5rem; +} + .radius-tr-lg { border-top-right-radius: .5rem; } @@ -2196,6 +2276,26 @@ button, border-radius: 9999px; } +.radius-t-full { + border-top-left-radius: 9999px; + border-top-right-radius: 9999px; +} + +.radius-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; +} + +.radius-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; +} + +.radius-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; +} + .radius-tr-full { border-top-right-radius: 9999px; } @@ -5136,6 +5236,26 @@ button, border-radius: 0; } + .sm\:radius-t-none { + border-top-left-radius: 0; + border-top-right-radius: 0; + } + + .sm\:radius-r-none { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .sm\:radius-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .sm\:radius-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .sm\:radius-tr-none { border-top-right-radius: 0; } @@ -5156,6 +5276,26 @@ button, border-radius: .125rem; } + .sm\:radius-t-sm { + border-top-left-radius: .125rem; + border-top-right-radius: .125rem; + } + + .sm\:radius-r-sm { + border-top-right-radius: .125rem; + border-bottom-right-radius: .125rem; + } + + .sm\:radius-b-sm { + border-bottom-right-radius: .125rem; + border-bottom-left-radius: .125rem; + } + + .sm\:radius-l-sm { + border-top-left-radius: .125rem; + border-bottom-left-radius: .125rem; + } + .sm\:radius-tr-sm { border-top-right-radius: .125rem; } @@ -5176,6 +5316,26 @@ button, border-radius: .25rem; } + .sm\:radius-t-md { + border-top-left-radius: .25rem; + border-top-right-radius: .25rem; + } + + .sm\:radius-r-md { + border-top-right-radius: .25rem; + border-bottom-right-radius: .25rem; + } + + .sm\:radius-b-md { + border-bottom-right-radius: .25rem; + border-bottom-left-radius: .25rem; + } + + .sm\:radius-l-md { + border-top-left-radius: .25rem; + border-bottom-left-radius: .25rem; + } + .sm\:radius-tr-md { border-top-right-radius: .25rem; } @@ -5196,6 +5356,26 @@ button, border-radius: .5rem; } + .sm\:radius-t-lg { + border-top-left-radius: .5rem; + border-top-right-radius: .5rem; + } + + .sm\:radius-r-lg { + border-top-right-radius: .5rem; + border-bottom-right-radius: .5rem; + } + + .sm\:radius-b-lg { + border-bottom-right-radius: .5rem; + border-bottom-left-radius: .5rem; + } + + .sm\:radius-l-lg { + border-top-left-radius: .5rem; + border-bottom-left-radius: .5rem; + } + .sm\:radius-tr-lg { border-top-right-radius: .5rem; } @@ -5216,6 +5396,26 @@ button, border-radius: 9999px; } + .sm\:radius-t-full { + border-top-left-radius: 9999px; + border-top-right-radius: 9999px; + } + + .sm\:radius-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; + } + + .sm\:radius-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .sm\:radius-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; + } + .sm\:radius-tr-full { border-top-right-radius: 9999px; } @@ -8157,6 +8357,26 @@ button, border-radius: 0; } + .md\:radius-t-none { + border-top-left-radius: 0; + border-top-right-radius: 0; + } + + .md\:radius-r-none { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .md\:radius-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .md\:radius-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .md\:radius-tr-none { border-top-right-radius: 0; } @@ -8177,6 +8397,26 @@ button, border-radius: .125rem; } + .md\:radius-t-sm { + border-top-left-radius: .125rem; + border-top-right-radius: .125rem; + } + + .md\:radius-r-sm { + border-top-right-radius: .125rem; + border-bottom-right-radius: .125rem; + } + + .md\:radius-b-sm { + border-bottom-right-radius: .125rem; + border-bottom-left-radius: .125rem; + } + + .md\:radius-l-sm { + border-top-left-radius: .125rem; + border-bottom-left-radius: .125rem; + } + .md\:radius-tr-sm { border-top-right-radius: .125rem; } @@ -8197,6 +8437,26 @@ button, border-radius: .25rem; } + .md\:radius-t-md { + border-top-left-radius: .25rem; + border-top-right-radius: .25rem; + } + + .md\:radius-r-md { + border-top-right-radius: .25rem; + border-bottom-right-radius: .25rem; + } + + .md\:radius-b-md { + border-bottom-right-radius: .25rem; + border-bottom-left-radius: .25rem; + } + + .md\:radius-l-md { + border-top-left-radius: .25rem; + border-bottom-left-radius: .25rem; + } + .md\:radius-tr-md { border-top-right-radius: .25rem; } @@ -8217,6 +8477,26 @@ button, border-radius: .5rem; } + .md\:radius-t-lg { + border-top-left-radius: .5rem; + border-top-right-radius: .5rem; + } + + .md\:radius-r-lg { + border-top-right-radius: .5rem; + border-bottom-right-radius: .5rem; + } + + .md\:radius-b-lg { + border-bottom-right-radius: .5rem; + border-bottom-left-radius: .5rem; + } + + .md\:radius-l-lg { + border-top-left-radius: .5rem; + border-bottom-left-radius: .5rem; + } + .md\:radius-tr-lg { border-top-right-radius: .5rem; } @@ -8237,6 +8517,26 @@ button, border-radius: 9999px; } + .md\:radius-t-full { + border-top-left-radius: 9999px; + border-top-right-radius: 9999px; + } + + .md\:radius-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; + } + + .md\:radius-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .md\:radius-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; + } + .md\:radius-tr-full { border-top-right-radius: 9999px; } @@ -11178,6 +11478,26 @@ button, border-radius: 0; } + .lg\:radius-t-none { + border-top-left-radius: 0; + border-top-right-radius: 0; + } + + .lg\:radius-r-none { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .lg\:radius-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .lg\:radius-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .lg\:radius-tr-none { border-top-right-radius: 0; } @@ -11198,6 +11518,26 @@ button, border-radius: .125rem; } + .lg\:radius-t-sm { + border-top-left-radius: .125rem; + border-top-right-radius: .125rem; + } + + .lg\:radius-r-sm { + border-top-right-radius: .125rem; + border-bottom-right-radius: .125rem; + } + + .lg\:radius-b-sm { + border-bottom-right-radius: .125rem; + border-bottom-left-radius: .125rem; + } + + .lg\:radius-l-sm { + border-top-left-radius: .125rem; + border-bottom-left-radius: .125rem; + } + .lg\:radius-tr-sm { border-top-right-radius: .125rem; } @@ -11218,6 +11558,26 @@ button, border-radius: .25rem; } + .lg\:radius-t-md { + border-top-left-radius: .25rem; + border-top-right-radius: .25rem; + } + + .lg\:radius-r-md { + border-top-right-radius: .25rem; + border-bottom-right-radius: .25rem; + } + + .lg\:radius-b-md { + border-bottom-right-radius: .25rem; + border-bottom-left-radius: .25rem; + } + + .lg\:radius-l-md { + border-top-left-radius: .25rem; + border-bottom-left-radius: .25rem; + } + .lg\:radius-tr-md { border-top-right-radius: .25rem; } @@ -11238,6 +11598,26 @@ button, border-radius: .5rem; } + .lg\:radius-t-lg { + border-top-left-radius: .5rem; + border-top-right-radius: .5rem; + } + + .lg\:radius-r-lg { + border-top-right-radius: .5rem; + border-bottom-right-radius: .5rem; + } + + .lg\:radius-b-lg { + border-bottom-right-radius: .5rem; + border-bottom-left-radius: .5rem; + } + + .lg\:radius-l-lg { + border-top-left-radius: .5rem; + border-bottom-left-radius: .5rem; + } + .lg\:radius-tr-lg { border-top-right-radius: .5rem; } @@ -11258,6 +11638,26 @@ button, border-radius: 9999px; } + .lg\:radius-t-full { + border-top-left-radius: 9999px; + border-top-right-radius: 9999px; + } + + .lg\:radius-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; + } + + .lg\:radius-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .lg\:radius-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; + } + .lg\:radius-tr-full { border-top-right-radius: 9999px; } @@ -14199,6 +14599,26 @@ button, border-radius: 0; } + .xl\:radius-t-none { + border-top-left-radius: 0; + border-top-right-radius: 0; + } + + .xl\:radius-r-none { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + + .xl\:radius-b-none { + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; + } + + .xl\:radius-l-none { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + } + .xl\:radius-tr-none { border-top-right-radius: 0; } @@ -14219,6 +14639,26 @@ button, border-radius: .125rem; } + .xl\:radius-t-sm { + border-top-left-radius: .125rem; + border-top-right-radius: .125rem; + } + + .xl\:radius-r-sm { + border-top-right-radius: .125rem; + border-bottom-right-radius: .125rem; + } + + .xl\:radius-b-sm { + border-bottom-right-radius: .125rem; + border-bottom-left-radius: .125rem; + } + + .xl\:radius-l-sm { + border-top-left-radius: .125rem; + border-bottom-left-radius: .125rem; + } + .xl\:radius-tr-sm { border-top-right-radius: .125rem; } @@ -14239,6 +14679,26 @@ button, border-radius: .25rem; } + .xl\:radius-t-md { + border-top-left-radius: .25rem; + border-top-right-radius: .25rem; + } + + .xl\:radius-r-md { + border-top-right-radius: .25rem; + border-bottom-right-radius: .25rem; + } + + .xl\:radius-b-md { + border-bottom-right-radius: .25rem; + border-bottom-left-radius: .25rem; + } + + .xl\:radius-l-md { + border-top-left-radius: .25rem; + border-bottom-left-radius: .25rem; + } + .xl\:radius-tr-md { border-top-right-radius: .25rem; } @@ -14259,6 +14719,26 @@ button, border-radius: .5rem; } + .xl\:radius-t-lg { + border-top-left-radius: .5rem; + border-top-right-radius: .5rem; + } + + .xl\:radius-r-lg { + border-top-right-radius: .5rem; + border-bottom-right-radius: .5rem; + } + + .xl\:radius-b-lg { + border-bottom-right-radius: .5rem; + border-bottom-left-radius: .5rem; + } + + .xl\:radius-l-lg { + border-top-left-radius: .5rem; + border-bottom-left-radius: .5rem; + } + .xl\:radius-tr-lg { border-top-right-radius: .5rem; } @@ -14279,6 +14759,26 @@ button, border-radius: 9999px; } + .xl\:radius-t-full { + border-top-left-radius: 9999px; + border-top-right-radius: 9999px; + } + + .xl\:radius-r-full { + border-top-right-radius: 9999px; + border-bottom-right-radius: 9999px; + } + + .xl\:radius-b-full { + border-bottom-right-radius: 9999px; + border-bottom-left-radius: 9999px; + } + + .xl\:radius-l-full { + border-top-left-radius: 9999px; + border-bottom-left-radius: 9999px; + } + .xl\:radius-tr-full { border-top-right-radius: 9999px; } diff --git a/src/generators/rounded.js b/src/generators/rounded.js index 0e6fd560f71c..ce360c0e9991 100644 --- a/src/generators/rounded.js +++ b/src/generators/rounded.js @@ -6,6 +6,22 @@ function sizedBorder(radius, modifier) { [`radius-${modifier}`]: { 'border-radius': `${radius}`, }, + [`radius-t-${modifier}`]: { + 'border-top-left-radius': `${radius}`, + 'border-top-right-radius': `${radius}`, + }, + [`radius-r-${modifier}`]: { + 'border-top-right-radius': `${radius}`, + 'border-bottom-right-radius': `${radius}`, + }, + [`radius-b-${modifier}`]: { + 'border-bottom-right-radius': `${radius}`, + 'border-bottom-left-radius': `${radius}`, + }, + [`radius-l-${modifier}`]: { + 'border-top-left-radius': `${radius}`, + 'border-bottom-left-radius': `${radius}`, + }, [`radius-tr-${modifier}`]: { 'border-top-right-radius': `${radius}`, }, From 5ea66c7e0bd0dd83bb847e4b670d3d7e86bdf4d4 Mon Sep 17 00:00:00 2001 From: Jonathan Reinink Date: Mon, 13 Nov 2017 16:03:46 -0500 Subject: [PATCH 4/9] Add margin auto to docs config (via default) --- docs/tailwind.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/tailwind.js b/docs/tailwind.js index 52cc443e5d0a..23838d01a51e 100644 --- a/docs/tailwind.js +++ b/docs/tailwind.js @@ -78,8 +78,14 @@ config.padding = Object.assign(config.padding, { '80': '20rem', }) -config.margin = config.padding +config.margin = Object.assign(config.margin, { + '10': '2.5rem', + '12': '3rem', + '16': '4rem', + '20': '5rem', + '80': '20rem', +}) -config.negativeMargin = config.padding +config.negativeMargin = config.margin module.exports = config From ec5bb5ed24e8d442c81d5199806a1f81fbb78915 Mon Sep 17 00:00:00 2001 From: Jonathan Reinink Date: Mon, 13 Nov 2017 16:40:48 -0500 Subject: [PATCH 5/9] Update the inline border radius documentation --- defaultConfig.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/defaultConfig.js b/defaultConfig.js index c263570bf8da..baf82df42bfa 100644 --- a/defaultConfig.js +++ b/defaultConfig.js @@ -406,11 +406,9 @@ module.exports = { | Border radius https://tailwindcss.com/docs/border-radius |----------------------------------------------------------------------------- | - | Here is where you define your border radius values. If a `default` radius - | is provided, it will be made available as the non-suffixed `.rounded` - | utility. + | Here is where you define your border radius values. | - | Class name: .radius-{size} + | Class name: .radius{-side?}-{size} | */ From d4f7b3b51390dee87cd27ad29f77b61d4230c42c Mon Sep 17 00:00:00 2001 From: Jonathan Reinink Date: Mon, 13 Nov 2017 16:41:08 -0500 Subject: [PATCH 6/9] Update docs for new radius utilities --- .../js/components/ResponsiveCodeSample.vue | 2 +- docs/source/_assets/less/markdown.less | 4 +- docs/source/_layouts/documentation.blade.php | 2 +- docs/source/_partials/code-sample.blade.php | 2 +- .../_partials/customized-config.blade.php | 2 +- .../source/_partials/feature-badges.blade.php | 32 +- .../work-in-progress-example.blade.php | 2 +- .../_partials/work-in-progress.blade.php | 2 +- docs/source/docs/border-color.blade.md | 2 +- docs/source/docs/border-radius.blade.md | 336 ++++++++++++++---- docs/source/docs/border-width.blade.md | 22 +- docs/source/docs/colors.blade.md | 20 +- docs/source/docs/examples/alerts.blade.md | 8 +- docs/source/docs/examples/buttons.blade.md | 28 +- docs/source/docs/examples/cards.blade.md | 14 +- docs/source/docs/examples/forms.blade.md | 30 +- docs/source/docs/examples/navigation.blade.md | 18 +- .../docs/extracting-components.blade.md | 30 +- docs/source/docs/forms.blade.md | 2 +- .../docs/functions-and-directives.blade.md | 6 +- docs/source/docs/installation.blade.md | 4 +- docs/source/docs/opacity.blade.md | 10 +- docs/source/docs/positioning.blade.md | 28 +- docs/source/docs/responsive-design.blade.md | 10 +- docs/source/docs/shadows.blade.md | 10 +- docs/source/docs/spacing.blade.md | 38 +- docs/source/docs/text-color.blade.md | 2 +- docs/source/docs/visibility.blade.md | 14 +- docs/source/docs/what-is-tailwind.blade.md | 18 +- docs/source/index.blade.php | 12 +- 30 files changed, 444 insertions(+), 266 deletions(-) diff --git a/docs/source/_assets/js/components/ResponsiveCodeSample.vue b/docs/source/_assets/js/components/ResponsiveCodeSample.vue index 408d694a6c25..c11a7655a7d5 100644 --- a/docs/source/_assets/js/components/ResponsiveCodeSample.vue +++ b/docs/source/_assets/js/components/ResponsiveCodeSample.vue @@ -22,7 +22,7 @@

xl

-
+
diff --git a/docs/source/_assets/less/markdown.less b/docs/source/_assets/less/markdown.less index 9081c6798497..b76bedf42b6d 100644 --- a/docs/source/_assets/less/markdown.less +++ b/docs/source/_assets/less/markdown.less @@ -31,7 +31,7 @@ > p code, p& code& { @apply .inline-block; @apply .bg-smoke-lighter; - @apply .rounded-sm; + @apply .radius-sm; @apply .text-sm; @apply .p-1; @apply .leading-none; @@ -46,7 +46,7 @@ @apply .font-mono; @apply .border-2; @apply .border-smoke; - @apply .rounded; + @apply .radius-md; font-weight: 400; } diff --git a/docs/source/_layouts/documentation.blade.php b/docs/source/_layouts/documentation.blade.php index f2e1f1f88bf7..48268c15349d 100644 --- a/docs/source/_layouts/documentation.blade.php +++ b/docs/source/_layouts/documentation.blade.php @@ -24,7 +24,7 @@

- +
diff --git a/docs/source/_partials/code-sample.blade.php b/docs/source/_partials/code-sample.blade.php index 3c5925c0b8be..cde8dd68ed18 100644 --- a/docs/source/_partials/code-sample.blade.php +++ b/docs/source/_partials/code-sample.blade.php @@ -1,4 +1,4 @@ -
+
{{ $slot }}
diff --git a/docs/source/_partials/customized-config.blade.php b/docs/source/_partials/customized-config.blade.php index f69383f2acd7..159e08e726be 100644 --- a/docs/source/_partials/customized-config.blade.php +++ b/docs/source/_partials/customized-config.blade.php @@ -1,4 +1,4 @@ -
+
{
// ...
diff --git a/docs/source/_partials/feature-badges.blade.php b/docs/source/_partials/feature-badges.blade.php index 4f2be45b5f24..50e7aef41e90 100644 --- a/docs/source/_partials/feature-badges.blade.php +++ b/docs/source/_partials/feature-badges.blade.php @@ -1,15 +1,15 @@
@if ($responsive) - - + + Responsive @else - - + + Responsive @@ -17,15 +17,15 @@ @endif @if ($customizable) - - + + Customizable @else - - + + Customizable @@ -33,15 +33,15 @@ @endif @if ($hover) - - + + Hover @else - - + + Hover @@ -49,15 +49,15 @@ @endif @if ($focus) - - + + Focus @else - - + + Focus diff --git a/docs/source/_partials/work-in-progress-example.blade.php b/docs/source/_partials/work-in-progress-example.blade.php index be08a866d65e..dc95d2093641 100644 --- a/docs/source/_partials/work-in-progress-example.blade.php +++ b/docs/source/_partials/work-in-progress-example.blade.php @@ -1,5 +1,5 @@
-
+
diff --git a/docs/source/_partials/work-in-progress.blade.php b/docs/source/_partials/work-in-progress.blade.php index 16a349c7023f..47cd42cbb94d 100644 --- a/docs/source/_partials/work-in-progress.blade.php +++ b/docs/source/_partials/work-in-progress.blade.php @@ -1,4 +1,4 @@ -
+
diff --git a/docs/source/docs/border-color.blade.md b/docs/source/docs/border-color.blade.md index a55a18f57423..f0c2b7247bd2 100644 --- a/docs/source/docs/border-color.blade.md +++ b/docs/source/docs/border-color.blade.md @@ -37,7 +37,7 @@ features: In addition to the standard responsive variations, border colors also come in `hover:` variations that apply the given border color on hover. @component('_partials.code-sample', ['class' => 'text-center']) - @endcomponent diff --git a/docs/source/docs/border-radius.blade.md b/docs/source/docs/border-radius.blade.md index 320a21f9a313..560a8e5e05d1 100644 --- a/docs/source/docs/border-radius.blade.md +++ b/docs/source/docs/border-radius.blade.md @@ -11,11 +11,6 @@ features:
- - - - - @@ -25,61 +20,229 @@ features: - - - + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove any border radius from all corners of an element. + + + + + + + + + + + + + + + + + + + + - - - + + + - - - + + + - - - + + + - - - + + +
Class
.roundedborder-radius: .25rem;Apply a medium border radius to all corners of an element..radius-smborder-radius: .125rem;Apply a small border radius to all corners of an element.
.rounded-smborder-radius: .125rem;Apply a small border radius to all corners of an element..radius-t-smborder-top-left-radius: .125rem;
border-top-right-radius: .125rem;
Apply a small border radius to the top corners of an element.
.radius-r-smborder-top-right-radius: .125rem;
border-bottom-right-radius: .125rem;
Apply a small border radius to the right corners of an element.
.radius-b-smborder-bottom-right-radius: .125rem;
border-bottom-left-radius: .125rem;
Apply a small border radius to the bottom corners of an element.
.radius-l-smborder-top-left-radius: .125rem;
border-bottom-left-radius: .125rem;
Apply a small border radius to the left corners of an element.
.radius-tl-smborder-top-left-radius: .125rem;Apply a small border radius to the top left corner of an element.
.radius-tr-smborder-top-right-radius: .125rem;Apply a small border radius to the top right corner of an element.
.radius-br-smborder-bottom-right-radius: .125rem;Apply a small border radius to the bottom right corner of an element.
.radius-bl-smborder-bottom-left-radius: .125rem;Apply a small border radius to the bottom left corner of an element.
.radius-mdborder-radius: .25rem;Apply a medium border radius to all corners of an element.
.radius-t-mdborder-top-left-radius: .25rem;
border-top-right-radius: .25rem;
Apply a medium border radius to the top corners of an element.
.radius-r-mdborder-top-right-radius: .25rem;
border-bottom-right-radius: .25rem;
Apply a medium border radius to the right corners of an element.
.radius-b-mdborder-bottom-right-radius: .25rem;
border-bottom-left-radius: .25rem;
Apply a medium border radius to the bottom corners of an element.
.radius-l-mdborder-top-left-radius: .25rem;
border-bottom-left-radius: .25rem;
Apply a medium border radius to the left corners of an element.
.radius-tl-mdborder-top-left-radius: .25rem;Apply a medium border radius to the top left corner of an element.
.radius-tr-mdborder-top-right-radius: .25rem;Apply a medium border radius to the top right corner of an element.
.radius-br-mdborder-bottom-right-radius: .25rem;Apply a medium border radius to the bottom right corner of an element.
.rounded-lgborder-radius: .5rem;.radius-bl-mdborder-bottom-left-radius: .25rem;Apply a medium border radius to the bottom left corner of an element.
.radius-lgborder-radius: .5rem; Apply a large border radius to all corners of an element.
.rounded-fullborder-radius: 9999px;.radius-t-lgborder-top-left-radius: .5rem;
border-top-right-radius: .5rem;
Apply a large border radius to the top corners of an element.
.radius-r-lgborder-top-right-radius: .5rem;
border-bottom-right-radius: .5rem;
Apply a large border radius to the right corners of an element.
.radius-b-lgborder-bottom-right-radius: .5rem;
border-bottom-left-radius: .5rem;
Apply a large border radius to the bottom corners of an element.
.radius-l-lgborder-top-left-radius: .5rem;
border-bottom-left-radius: .5rem;
Apply a large border radius to the left corners of an element.
.radius-tl-lgborder-top-left-radius: .5rem;Apply a large border radius to the top left corner of an element.
.radius-tr-lgborder-top-right-radius: .5rem;Apply a large border radius to the top right corner of an element.
.radius-br-lgborder-bottom-right-radius: .5rem;Apply a large border radius to the bottom right corner of an element.
.radius-bl-lgborder-bottom-left-radius: .5rem;Apply a large border radius to the bottom left corner of an element.
.radius-fullborder-radius: 9999px; Fully round all corners of an element.
.rounded-noneborder-radius: 0;Remove any border radius from all sides of an element..radius-t-fullborder-top-left-radius: 9999px;
border-top-right-radius: 9999px;
Fully round the top corners of an element.
.radius-r-fullborder-top-right-radius: 9999px;
border-bottom-right-radius: 9999px;
Fully round the right corners of an element.
.radius-b-fullborder-bottom-right-radius: 9999px;
border-bottom-left-radius: 9999px;
Fully round the bottom corners of an element.
.radius-l-fullborder-top-left-radius: 9999px;
border-bottom-left-radius: 9999px;
Fully round the left corners of an element.
.radius-tl-fullborder-top-left-radius: 9999px;Fully round the top left corner of an element.
.radius-tr-fullborder-top-right-radius: 9999px;Fully round the top right corner of an element.
.radius-br-fullborder-bottom-right-radius: 9999px;Fully round the bottom right corner of an element.
.radius-bl-fullborder-bottom-left-radius: 9999px;Fully round the bottom left corner of an element.
.radius-noneborder-radius: 0;
.radius-t-noneborder-top-left-radius: 0;
border-top-right-radius: 0;
Remove any border radius from the top corners of an element.
.radius-r-noneborder-top-right-radius: 0;
border-bottom-right-radius: 0;
Remove any border radius from the right corners of an element.
.radius-b-noneborder-bottom-right-radius: 0;
border-bottom-left-radius: 0;
Remove any border radius from the bottom corners of an element.
.radius-l-noneborder-top-left-radius: 0;
border-bottom-left-radius: 0;
Remove any border radius from the left corners of an element.
.rounded-t - border-bottom-left-radius: 0;
- border-bottom-right-radius: 0; -
Only round the top corners of an element..radius-tl-noneborder-top-left-radius: 0;Remove any border radius from the top left corner of an element.
.rounded-r - border-top-left-radius: 0;
- border-bottom-left-radius: 0; -
Only round the right side corners of an element..radius-tr-noneborder-top-right-radius: 0;Remove any border radius from the top right corner of an element.
.rounded-b - border-top-right-radius: 0;
- border-top-left-radius: 0; -
Only round the bottom corners of an element..radius-br-noneborder-bottom-right-radius: 0;Remove any border radius from the bottom right corner of an element.
.rounded-l - border-top-right-radius: 0;
- border-bottom-right-radius: 0; -
Only round the left side corners of an element..radius-bl-noneborder-bottom-left-radius: 0;Remove any border radius from the bottom left corner of an element.
@@ -87,96 +250,113 @@ features: ## Rounded corners -Use the `.rounded`, `.rounded-sm`, or `.rounded-lg` utilities to apply different border radius sizes to an element. +Use the `.radius-sm`, `.radius-md`, or `.radius-lg` utilities to apply different border radius sizes to an element. @component('_partials.code-sample', ['class' => 'flex justify-around text-sm']) -
.rounded-sm
-
.rounded
-
.rounded-lg
+
.radius-sm
+
.radius-md
+
.radius-lg
@slot('code') -
-
-
+
+
+
@endslot @endcomponent ## Pills and circles -Use the `.rounded-full` utility to create pills and circles. +Use the `.radius-full` utility to create pills and circles. @component('_partials.code-sample', ['class' => 'flex items-center justify-around text-sm']) -
Pill shape
-
Circle
+
Pill shape
+
Circle
@slot('code') -
Pill shape
-
Circle
+
Pill shape
+
Circle
@endslot @endcomponent ## No rounding -Use `.rounded-none` to remove an existing border radius from an element. +Use `.radius-none` to remove an existing border radius from an element. This is most commonly used to remove a border radius that was applied at a smaller breakpoint. @component('_partials.code-sample', ['class' => 'flex justify-around text-sm py-8']) -
.rounded-none
+
.radius-none
@slot('code') -
+
@endslot @endcomponent ## Rounding sides separately -Combine one of the `.rounded{-size}` utilities with `.rounded-t`, `.rounded-r`, `.rounded-b`, or `.rounded-l` to only round one side of an element. +Use `.radius-{t|r|b|l}-{size}` to only round one side an element. @component('_partials.code-sample', ['class' => 'flex justify-around text-sm']) -
.rounded-t
-
.rounded-r
-
.rounded-b
-
.rounded-l
+
.radius-t-lg
+
.radius-r-lg
+
.radius-b-lg
+
.radius-l-lg
@slot('code') -
-
-
-
+
+
+
+
+@endslot +@endcomponent + +## Rounding corners separately + +Use `.radius-{tl|tr|br|bl}-{size}` to only round one corner an element. + +@component('_partials.code-sample', ['class' => 'flex justify-around text-sm']) +
.radius-tl-lg
+
.radius-tr-lg
+
.radius-br-lg
+
.radius-bl-lg
+@slot('code') +
+
+
+
@endslot @endcomponent ## Responsive -To control the border radius of an element at a specific breakpoint, add a `{screen}:` prefix to any existing border radius utility. For example, use `md:rounded-lg` to apply the `rounded-lg` utility at only medium screen sizes and above. +To control the border radius of an element at a specific breakpoint, add a `{screen}:` prefix to any existing border radius utility. For example, use `md:radius-lg` to apply the `radius-lg` utility at only medium screen sizes and above. For more information about Tailwind's responsive design features, check out the [Responsive Design](/docs/responsive-design) documentation. @component('_partials.responsive-code-sample') @slot('none')
-
+
@endslot @slot('sm')
-
+
@endslot @slot('md')
-
+
@endslot @slot('lg')
-
+
@endslot @slot('xl')
-
+
@endslot @slot('code') -
+
@endslot @@ -186,16 +366,14 @@ For more information about Tailwind's responsive design features, check out the By default Tailwind provides five border radius size utilities. You can change, add, or remove these by editing the `borderRadius` section of your Tailwind config. -If a `default` border radius is provided, it will be used for the non-suffixed `.rounded` utility. Any other keys will be used as suffixes, for example the key `'2'` will create a corresponding `.rounded-2` utility. - -Note that only the different border radius *sizes* can be customized; the utilities for controlling which side to round (like `.rounded-t`) aren't customizable. +Note that only the different border radius *sizes* can be customized; the utilities for controlling which side to round (like `.radius-t`) aren't customizable. @component('_partials.customized-config', ['key' => 'borderRadius']) -- default: '.25rem', -+ default: '4px', + 'none': '0', - 'sm': '.125rem', +- 'md': '.25rem', ++ 'md': '4px', - 'lg': '.5rem', - 'full': '9999px', + 'large': '12px', - 'none': '0', @endcomponent diff --git a/docs/source/docs/border-width.blade.md b/docs/source/docs/border-width.blade.md index 19dca9611951..f4f45c7bb817 100644 --- a/docs/source/docs/border-width.blade.md +++ b/docs/source/docs/border-width.blade.md @@ -18,22 +18,22 @@ For example, `.border` would add a `1px` border to all sides of the element, whe
Class
-
border
+
border
Side (optional)
-
  All (default)
-
t Top
-
r Right
-
b Bottom
-
l Left
+
  All (default)
+
t Top
+
r Right
+
b Bottom
+
l Left
Width (optional)
-
0 0px
-
  1px (default)
-
2 2px
-
4 4px
-
8 8px
+
0 0px
+
  1px (default)
+
2 2px
+
4 4px
+
8 8px
diff --git a/docs/source/docs/colors.blade.md b/docs/source/docs/colors.blade.md index e4ca285b7eb5..9c9008b9370d 100644 --- a/docs/source/docs/colors.blade.md +++ b/docs/source/docs/colors.blade.md @@ -12,7 +12,7 @@ To get you started, we've provided a generous palette of great looking colors th
-
+
Grey
@@ -62,7 +62,7 @@ To get you started, we've provided a generous palette of great looking colors th
-
+
Red
@@ -101,7 +101,7 @@ To get you started, we've provided a generous palette of great looking colors th
-
+
Orange
@@ -140,7 +140,7 @@ To get you started, we've provided a generous palette of great looking colors th
-
+
Yellow
@@ -179,7 +179,7 @@ To get you started, we've provided a generous palette of great looking colors th
-
+
Green
@@ -218,7 +218,7 @@ To get you started, we've provided a generous palette of great looking colors th
-
+
Teal
@@ -257,7 +257,7 @@ To get you started, we've provided a generous palette of great looking colors th
-
+
Blue
@@ -296,7 +296,7 @@ To get you started, we've provided a generous palette of great looking colors th
-
+
Indigo
@@ -335,7 +335,7 @@ To get you started, we've provided a generous palette of great looking colors th
-
+
Purple
@@ -374,7 +374,7 @@ To get you started, we've provided a generous palette of great looking colors th
-
+
Pink
diff --git a/docs/source/docs/examples/alerts.blade.md b/docs/source/docs/examples/alerts.blade.md index d35f4b55b12e..318ed80f086e 100644 --- a/docs/source/docs/examples/alerts.blade.md +++ b/docs/source/docs/examples/alerts.blade.md @@ -9,7 +9,7 @@ description: null ### Traditional @component('_partials.code-sample', ['lang' => 'html']) -