polymer paper-menu-button change the default size of icon - css

Is there way to set the size of polymer paper-menu-button element. I think it is the icon size is set to 24px. I wish to have it as 20px but I cannot find a way to do it.
Thanks
Dennis

I tried it and it worked.
Add this style to the Polymer element containing your <paper-menu-button> element.
paper-menu-button /deep/ core-icon[role=img] {
height: 20px;
width: 20px;
}
I added [role=img] to increase the selectivity.

Related

how do I set the width of p-tree to fill the available space?

I cannot properly set the width to fill the available space for a p-tree primeng control.
It works in chrome devtools when I do it manually but doesn't when I do it in the style file of my component.
Stackblitz link:
https://stackblitz.com/edit/angular6-primeng-gjz1po
The tree will stay 18em of width no matter what.
Thank you in advance.
The html code:
<p-tree [value]=filesTree1></p-tree>
The css code:
.ui-tree {
width: 100%;
}
You can use styleClass property of p-tree control.
<p-tree [value]=filesTree1 [styleClass]="'my-tree'"></p-tree>
Add below css in tree.scss file.
:host ::ng-deep .ui-tree.my-tree {
width: 100%;
}
Here is stackblitz

Angular 2 component tags breaks layout styles

2 issues plnkr
http://plnkr.co/edit/uGSGtK6FtiICc1HbYy5i?p=preview
margin-left breaks
flex-grow breaks
and some other rules too due to components tags.
Styles provided by other team, they stored separately and some of them are related to media-query, so i can't use uglyhack with :host { margin-left: auto; }. Also some styles (flex-grow e.x.) have numerical values and can't be easily tracked and changed on real styles changes.
How this can be solved without writing angular-specific styles?
margin-left doesn't not move user to the right. if you want it be there then use a style
.header-user {
position: absolute;
right: 16px;
...
}
flex layout works if you use a style on <flex-item> element. Yes, angular created this element inside the container that should be 1st child of the parent div.

Set a custom width to the dropdown list items in Bootstrap

How do i set a custom width to the dropdown list items in bootstrap 3.0.
I have a dropdown list, but the width of the items is usually the same size for all, and that size is determined by the longest item width.
Is it possible to customize the width and if the item words ar too long to fit, then wrap them?
you can do it just like you would without bootstrap:
ul{
width: 22px;
}
i just checked this version and it works.
if this doesn't work try adding !important, it should work
ul{
width: 22px !important;
}
Yes, You can customize everything in css and also in bootstrap framwork, when you used dropdown then take css automatic by bootstrap, you can also override this css. you can all css override with the help of "!important" property.
You can follow this mathod:
width : 100px; or width:100px !important
If width also not working then you can try min-width property.
min-width : 100px; or min-width:100px !important
ThankYou.

jquery mobile: how style listview?

I can't seem to find in the stylesheet the Listview. I would like to style the heigt/margin up and down of the listview and buttons.
Does anybody know where to style this?
Are you sure you want to change margin, not padding? When you change the margin, background colors will not match. Anyway, try this CSS for changing padding:
.ui-listview li.ui-li {
padding-top: 40px;
padding-bottom: 40px;
}​
You can update margin instead using the same CSS selector.

Can't change the twitter button width

http://boutique40.com/
I want to align the 2 social icons exactly in the center. And actually to do that I want to set to the twitter icon the width value of 80px, but I can't do it. I only manage to do that in the browser editor; I can't seem to select the right class and element.style overides it whatever I do. What is this?
element.style {
width: 110px;
height: 20px;
}
I don't wont to wrap the whole button to change the size (or should I?). The code that should be working is this:
.twitter-share-button { vertical-align:top;
margin-left:10px; width: 80px;}
In Chrome's developer tools element.style shows any inline styles that are applied to the selected element.
To override them use !important
So to set the button width to 80px you could use:
.twitter-share-button {
width: 80px !important;
}
Try using a local style on the button itself, by using the style attribute:
style = "width: 80px;"
the local style should overwrite it.

Resources