Browse Source

Adds #570 labeled inputs

pull/1139/merge
jlukic 10 years ago
parent
commit
1b489cbde8
3 changed files with 69 additions and 9 deletions
  1. 1
      RELEASE NOTES.md
  2. 70
      src/definitions/elements/input.less
  3. 7
      src/themes/packages/default/elements/input.variables

1
RELEASE NOTES.md

@ -13,6 +13,7 @@
- **Accordion** - Accordions are not unstyled by default allowing for more compatability with other modules without having to override styles. Styled accordions are now included as a variation ``ui styled accordion``
- **Item** - Items have now been renamed "card" to allow for a more generic item list that does not use a "card" style. Some 'card' view content has been slightly adjusted. Please refer to documentation
- **Header / Icon** - Inverted headers and icons no longer invert background colors, but instead use a lighter version of colors more legible on dark backgrounds. Inverted circular icons, still however invert the color of the circle.
- **Input** - Labeled inputs now have ``corner`` ``left`` and ``top`` labels. Any labeled inputs must now be converted to ``corner labeled input`` to maintain default position in ``0.x``
- **Modal** - AllowMultiple (allowing multiple modals at once) is now set to **false** by default.
- **Table** - Tables are no longer striped by default, instead you must specify the 'striped' variation

70
src/definitions/elements/input.less

@ -236,10 +236,63 @@
Labeled
---------------------*/
/* Adjacent Label */
.ui.labeled.input {
display: table;
}
.ui.labeled.input > input {
display: table-cell;
vertical-align: top;
}
.ui.labeled.input > .label {
display: table-cell;
vertical-align: middle;
white-space: nowrap;
font-size: 1em;
}
.ui.labeled.input > .label > .icon {
display: inline;
vertical-align: top;
}
/* Fluid Labeled */
.ui.fluid.labeled.input {
display: table;
width: 100%;
}
.ui.fluid.labeled.input > .label {
width: 0.01%;
}
/* Label on Left */
.ui.labeled.input:not([class*="corner labeled"]):not([class*="right labeled"]) > input {
border-left: none;
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
.ui.labeled.input:not([class*="corner labeled"]):not([class*="right labeled"]) > .label {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
}
/* Label on Right */
.ui[class*="right labeled"].input > input {
border-right: none;
border-top-right-radius: 0px !important;
border-bottom-right-radius: 0px !important;
}
.ui[class*="right labeled"].input > .label {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
}
/* Corner Label */
.ui.labeled.input .corner.label {
top: @labelTop;
right: @labelRight;
font-size: @labelSize;
top: @labelCornerTop;
right: @labelCornerRight;
font-size: @labelCornerSize;
border-radius: 0em @borderRadius 0em 0em;
}
.ui.labeled.input input {
@ -247,14 +300,19 @@
}
/* Spacing with corner label */
.ui.labeled.icon.input:not(.left) > input {
.ui[class*="corner labeled"].input {
display: inline-block;
}
.ui[class*="corner labeled"].input > input {
display: block;
}
.ui[class*="corner labeled"].icon.input:not(.left) > input {
padding-right: @labeledIconInputMargin !important;
}
.ui.labeled.icon.input:not(.left) > .icon {
.ui[class*="corner labeled"].icon.input:not(.left) > .icon {
margin-right: @labeledIconMargin;
}
/*--------------------
Action
---------------------*/

7
src/themes/packages/default/elements/input.variables

@ -49,9 +49,10 @@
@circularIconHorizontalOffset: 0.5em;
/* Labeled Input */
@labelTop: @borderWidth;
@labelRight: @borderWidth;
@labelSize: 0.75em;
@labelCornerTop: @borderWidth;
@labelCornerRight: @borderWidth;
@labelCornerSize: 0.75em;
@labelSize: 1em;
@labeledMargin: 2.5em;
@labeledIconInputMargin: 3.25em;

Loading…
Cancel
Save