From 9b53954f7727d659885e5b1a20c00cc897b68e79 Mon Sep 17 00:00:00 2001 From: Alberto Maturano Date: Thu, 27 Aug 2015 17:24:01 -0500 Subject: [PATCH 1/3] Support labels attached on both sides for input --- src/definitions/elements/input.less | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/definitions/elements/input.less b/src/definitions/elements/input.less index c87f35091..cd1fb954e 100755 --- a/src/definitions/elements/input.less +++ b/src/definitions/elements/input.less @@ -339,15 +339,23 @@ } /* Regular Label on Right */ -.ui[class*="right labeled"].input > input { +.ui[class*="right labeled"].input > input, +.ui[class*="both sides labeled"].input > input { border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; } -.ui[class*="right labeled"].input > .label { +.ui[class*="right labeled"].input > .label, +.ui.both.sides.labeled.input > input + .label { border-top-left-radius: 0px; border-bottom-left-radius: 0px; } +/* Both Sides Labeled (redo right label radius) */ +.ui.both.sides.labeled.input > input + .label { + border-top-right-radius: @borderRadius !important; + border-bottom-right-radius: @borderRadius !important; +} + /* Corner Label */ .ui.labeled.input .corner.label { top: @labelCornerTop; From ef529b3a1db8d769bba30ff0891d9d4a4669aacb Mon Sep 17 00:00:00 2001 From: Alberto Maturano Date: Thu, 27 Aug 2015 19:07:04 -0500 Subject: [PATCH 2/3] Grouping selectors --- src/definitions/elements/input.less | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/definitions/elements/input.less b/src/definitions/elements/input.less index cd1fb954e..42b7ffca0 100755 --- a/src/definitions/elements/input.less +++ b/src/definitions/elements/input.less @@ -339,21 +339,26 @@ } /* Regular Label on Right */ -.ui[class*="right labeled"].input > input, -.ui[class*="both sides labeled"].input > input { +.ui[class*="right labeled"].input > input { border-top-right-radius: 0px !important; border-bottom-right-radius: 0px !important; } -.ui[class*="right labeled"].input > .label, -.ui.both.sides.labeled.input > input + .label { +.ui[class*="right labeled"].input > .label { border-top-left-radius: 0px; border-bottom-left-radius: 0px; } -/* Both Sides Labeled (redo right label radius) */ +/* Regular Labels on Both Sides */ +.ui.both.sides.labeled.input > input { + border-top-right-radius: 0px; + border-bottom-right-radius: 0px; +} .ui.both.sides.labeled.input > input + .label { - border-top-right-radius: @borderRadius !important; - border-bottom-right-radius: @borderRadius !important; + border-top-left-radius: 0px; + border-bottom-left-radius: 0px; + /* Redo input's radius removed by the "left label" */ + border-top-right-radius: @borderRadius; + border-bottom-right-radius: @borderRadius; } /* Corner Label */ From 0d92b4f6ac286c2bda5e089424348f2e681d1b5c Mon Sep 17 00:00:00 2001 From: Alberto Maturano Date: Thu, 27 Aug 2015 23:24:58 -0500 Subject: [PATCH 3/3] Forgetting implementing `both sides labeled` --- src/definitions/elements/input.less | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/src/definitions/elements/input.less b/src/definitions/elements/input.less index 42b7ffca0..45420c067 100755 --- a/src/definitions/elements/input.less +++ b/src/definitions/elements/input.less @@ -329,36 +329,23 @@ } /* Regular Label on Left */ -.ui.labeled.input:not([class*="corner labeled"]):not([class*="right labeled"]) > input { - border-top-left-radius: 0px; - border-bottom-left-radius: 0px; -} -.ui.labeled.input:not([class*="corner labeled"]):not([class*="right labeled"]) > .label { +.ui.labeled.input:not([class*="corner labeled"]) .label:nth-child(1) { border-top-right-radius: 0px; border-bottom-right-radius: 0px; } - -/* Regular Label on Right */ -.ui[class*="right labeled"].input > input { - border-top-right-radius: 0px !important; - border-bottom-right-radius: 0px !important; -} -.ui[class*="right labeled"].input > .label { +.ui.labeled.input:not([class*="corner labeled"]) .label:nth-child(1) + input { border-top-left-radius: 0px; border-bottom-left-radius: 0px; } -/* Regular Labels on Both Sides */ -.ui.both.sides.labeled.input > input { +/* Regular Label on Right */ +.ui.right.labeled.input input { border-top-right-radius: 0px; border-bottom-right-radius: 0px; } -.ui.both.sides.labeled.input > input + .label { +.ui.right.labeled.input input + .label { border-top-left-radius: 0px; border-bottom-left-radius: 0px; - /* Redo input's radius removed by the "left label" */ - border-top-right-radius: @borderRadius; - border-bottom-right-radius: @borderRadius; } /* Corner Label */