]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
refactor: simplify Input Group border-radius selector
authorNicolas Coden <nicolas@ncoden.fr>
Sun, 1 Jul 2018 20:00:40 +0000 (22:00 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Sun, 1 Jul 2018 20:00:40 +0000 (22:00 +0200)
We should assume as little as possible to HTML structure inside our components. People should be able to freely use the classes of components/elements we provide without limited by self-references and dependencies.

This commit simplify the selector used to apply border-radius on Input Group childreens to make all childreens affected, with a single exception for `.input-group-button` where sub-childreens are affected too.

scss/forms/_input-group.scss

index e0af6d93cf738d20c22599b3c492b71c7cc9f401..c55b1ef395765eb65c0602bd5a68c28c33711690 100644 (file)
@@ -34,13 +34,13 @@ $input-prefix-padding: 1rem !default;
     }
 
     > :first-child {
-      &:not(.input-group-button), &.input-group-button > * {
+      &, &.input-group-button > * {
         border-radius: if($global-text-direction == rtl, 0 $input-radius $input-radius 0, $input-radius 0 0 $input-radius);
       }
     }
 
     > :last-child {
-      &:not(.input-group-button), &.input-group-button > * {
+      &, &.input-group-button > * {
         border-radius: if($global-text-direction == rtl, $input-radius 0 0 $input-radius, 0 $input-radius $input-radius 0);
       }
     }