-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
method to set label before checkbox in CheckboxSetInputBase class #557
Conversation
display: flex; | ||
align-items: center; | ||
} | ||
.ui-cbis-p label { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want extra margin only when label is before checkbox, otherwise it would consume some unwanted space when it is used as after checkbox.
Add separate part of style (label-first) to mark that:
.ui-cbis-p {
padding-right: 10px;
&.label-first {
display: flex;
align-items: center;
label {
margin-right: 4px;
}
}
}
IRenderInto<T> cr = m_actualContentRenderer; | ||
if(cr == null) | ||
cr = m_actualContentRenderer = calculateContentRenderer(lv); | ||
Label span = new Label(); | ||
span.setForTarget((NodeBase) cb); | ||
pair.add(span); | ||
if(m_labelBeforeCheckbox) { | ||
pair.add(span); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add:
span.addCss("label-first");
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see remarks
IRenderInto<T> cr = m_actualContentRenderer; | ||
if(cr == null) | ||
cr = m_actualContentRenderer = calculateContentRenderer(lv); | ||
Label span = new Label(); | ||
span.setForTarget((NodeBase) cb); | ||
pair.add(span); | ||
if(m_labelBeforeCheckbox) { | ||
span.addCssClass("label-first"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All css classes in DomUI use the ui-prefix combined with the component short code.
Ability to set the labels for each checkbox on the left side of the toggle.
The spacing between two filters and their belonging labels are made bigger so it is more clear which label refers to which toggle.