When Card title is too long, it's will became 'Lorem ipsum...'.
I would like to make the text to next line instead of '...'.
I manage to found this css can help, but where can I change it globally?
.ant-card-head-title {
white-space: initial;
}
Almost right...
.ant-card-head-title {
text-overflow: unset;
white-space: unset;
}
or initialif that is your preference. Put it in a .css file that you import into all javascript files where you add the <Card>
Related
I want to change the title style of the Angular Dart material-expansionpanel.
If I use the following CSS, the content style change (p.ex. radio group) but the title does not change style.
material-expansionpanel {
font-weight: bold;
}
What do I need to do to change the style of the title?
Since the style is encapsulated you need to use one of our mixins or ::ng-deep to break the encapsulation. Since there isn't a mixin for this you can do.
:host ::ng-deep header .primary-text {
font-weight: bold;
}
The :host is to keep the scope to the current component so it doesn't leak out. ::ng-deep breaks encapsulation and the rest is the selector.
I've never used AngularDart before, but from the examples, I think you have to target the panel-name class to style the expansion panel header:
.panel-name {
font-weight: bold;
}
I have this piece of code
private VaadinLabel email,
this.email = new VaadinLabel();
this.informativoDab = new VaadinLabel();
HorizontalLayout row = new HorizontalLayout();
row.setWidth("100%");
row.addComponent(this.email);
row.addComponent(this.informativoDab);
And it gives me this:
When I actually want this:
It should be simple to do, but I've tried doing
this.email.setWidth("50%");
and it didn't work.
How can I do this with Vaadin Label, since I also need a hint to show the entire e-mail?
You should actually use "100%" as the label size as it should take all the space the layout gives for it, half in this case.
By default Vaadin will then wrapt the text on multiple lines. IIRC there isn't a built in css style name to do it, so you'll need to use CSS to disable wrapping and use the ellipsis to visualise overflown text. You could e.g. use "cut_text" style name (email.addStyleName("cut_text")) for your email label along with following css rules to your theme:
.cut_text {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
as #mstahv mentioned, add a style name to your label
email.addStyleName("cut_text");
and use that css he wrote
.cut_text {
white-space: nowrap;
text-overflow: ellipsis;
}
as for the whole email to be displayed, I would suggest adding a description. Then when user hovers the hidden email it will popup in a small tooltip.
email.setDescription("very_long#email.com");
So in my .container I see that there is 1px padding on the top and bottom of the <div> which is coming from my Bootstrap include in my RoR project. Even a band-aid solution would be desirable.
The css from Bootstrap that matches these :before and :after selectors are the following:
media="all"
*:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
media="all"
.container:before, .container:after {
content: " ";
display: table;
}
What would be the inverse of these operations? Or how could I simply overwrite them before I load them in my application.css.scss file?
This is due to the clearfix that Bootstrap adds to the .container and other elements like .row, see mixins/clearfix.less in Bootstrap's repository.
The :before part is used to keep the margins from collapsing and the :after part is used to contain for example the floating columns inside a .row element. See Nicolas Gallagher's clearfix hack post for a more complete explanation.
If you don't want to keep the top margin from collapsing you can overwrite it, probably by simply setting .container:before { display: none; }
I am trying to get an OptionGroup to have the labels next to them, on the right hand side like normal radio buttons in every other UI I have ever used, instead of underneath them. I do not see anything in the API regarding how to change the layout of this? Anyone point me in the correct direction?
Follow these steps:
Add these lines to your css
.v-select-optiongroup-horizontal .v-select-option {
display: inline-block;
}
.v-select-optiongroup-horizontal {
white-space: nowrap;
}
.v-select-optiongroup-horizontal
.v-select-option.v-radiobutton {
padding-right: 10px;
}
And call
group.setStyleName("horizontal");
where group is the OptionGroup object.
Is it possible that you inherited some styles that display the text like that?
Did you try to call hzl.setSizeUndefined()? Or maybe playing with the width (setWidth()).
I would like to move position a bit to the left of my jQuery UI suggestion list. Here function and everything work very fine
Unfortunately I have no idea how to move that list a bit to left align left about 10px the page is responsive that is why scared that how to move left.
I think this is the documentation: http://docs.jquery.com/Plugins/Autocomplete/autocomplete.
You can set the style in this class
.ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-active
{
margin-left: -10px !important;
}
Try adding this in your CSS and not in the jQuery-ui CSS file
you can add margin-left: -11px; in to the list DIV