]> git.ipfire.org Git - thirdparty/bulma.git/commitdiff
Allow border radius if only one control in field
authorJoe Sweeney <joe.sweeney224@gmail.com>
Sun, 14 Oct 2018 07:22:41 +0000 (01:22 -0600)
committerJeremy Thomas <bbxdesign@gmail.com>
Sun, 28 Oct 2018 09:30:52 +0000 (09:30 +0000)
If there is only one child inside a field with addons, the current first and last child selectors remove any radius. Since a single control would be both a first and last child at the same time, it gets canceled out. This leverages the :only-child property to not apply this rule if there is only one control.

sass/elements/form.sass

index 7d9f9bf73c08d8b851c6079ab591c4ac8b5ae797..c73f10fdf539061228d0591ffd0148739f68c0ba 100644 (file)
@@ -437,13 +437,13 @@ $help-size: $size-small !default
         .input,
         .select select
           border-radius: 0
-      &:first-child
+      &:first-child:not(:only-child)
         .button,
         .input,
         .select select
           border-bottom-right-radius: 0
           border-top-right-radius: 0
-      &:last-child
+      &:last-child:not(:only-child)
         .button,
         .input,
         .select select