File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -527,6 +527,21 @@ ul {
527527 * Tailwind custom reset styles
528528 */
529529
530+ /**
531+ * Allow adding a border to an element by just adding a border-width.
532+ *
533+ * By default, the way the browser specifies that an element should have no
534+ * border is by setting it's border-style to `none` in the user-agent
535+ * stylesheet.
536+ *
537+ * In order to easily add borders to elements by just setting the `border-width`
538+ * property, we change the default border-style for all elements to `solid`, and
539+ * use border-width to hide them instead. This way our `border` utilities only
540+ * need to set the `border-width` property instead of the entire `border`
541+ * shorthand, making our border utilities much more straightforward to compose.
542+ *
543+ * https://github.com/tailwindcss/tailwindcss/pull/116
544+ */
530545* ,
531546* ::before ,
532547* ::after {
@@ -535,6 +550,19 @@ ul {
535550 border-color : config ('borderColors.default' , currentColor);
536551}
537552
553+ /**
554+ * Undo the `border-style: none` reset that Normalize applies to images so that
555+ * our `border-{width}` utilities have the expected effect.
556+ *
557+ * The Normalize reset is unnecessary for us since we default the border-width
558+ * to 0 on all elements.
559+ *
560+ * https://github.com/tailwindcss/tailwindcss/issues/362
561+ */
562+ img {
563+ border-style : solid;
564+ }
565+
538566/**
539567 * Temporary reset for a change introduced in Chrome 62 but now reverted.
540568 *
You can’t perform that action at this time.
0 commit comments