File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -532,6 +532,22 @@ ul {
532532 * Tailwind custom reset styles
533533 */
534534
535+ /**
536+ * Allow adding a border to an element by just adding a border-width.
537+ *
538+ * By default, the way the browser specifies that an element should have no
539+ * border is by setting it's border-style to `none` in the user-agent
540+ * stylesheet.
541+ *
542+ * In order to easily add borders to elements by just setting the `border-width`
543+ * property, we change the default border-style for all elements to `solid`, and
544+ * use border-width to hide them instead. This way our `border` utilities only
545+ * need to set the `border-width` property instead of the entire `border`
546+ * shorthand, making our border utilities much more straightforward to compose.
547+ *
548+ * https://github.com/tailwindcss/tailwindcss/pull/116
549+ */
550+
535551* ,
536552* ::before ,
537553* ::after {
@@ -540,6 +556,20 @@ ul {
540556 border-color : # dae1e7 ;
541557}
542558
559+ /**
560+ * Undo the `border-style: none` reset that Normalize applies to images so that
561+ * our `border-{width}` utilities have the expected effect.
562+ *
563+ * The Normalize reset is unnecessary for us since we default the border-width
564+ * to 0 on all elements.
565+ *
566+ * https://github.com/tailwindcss/tailwindcss/issues/362
567+ */
568+
569+ img {
570+ border-style : solid;
571+ }
572+
543573/**
544574 * Temporary reset for a change introduced in Chrome 62 but now reverted.
545575 *
You can’t perform that action at this time.
0 commit comments