I am working on md-slider, Here my question is how can we have the color of the slider as own, as default the having two classes md-warn(for red), and md-primary(for white). I want white color slider.
How can I achieve this?
Visores' answer was very useful, however this didn't quite match the functionality of the default slider insofar as the right hand side of the md-thumb ends up the same colour as the rest of the slider. By changing the
.md-track to .md-track-fill, you will match the default functionality. The code will therefore look as follows:
#red-slider .md-thumb:after, #red-slider .md-track-fill{
background-color: greenyellow !important;
border-color: greenyellow !important;
}
#red-slider .md-focus-thumb, #red-slider .md-focus-ring{
background-color: greenyellow;
}
CodePen example
you can achieve a custom color by overwriting the css-class of the slider.
codepen example
#red-slider .md-thumb:after, #red-slider .md-track{
background-color: greenyellow !important;
border-color: greenyellow !important;
}
#red-slider .md-focus-thumb, #red-slider .md-focus-ring{
background-color: greenyellow;
}
css classes to overwrite:
.md-thumb:after
.md-track
.md-focus-thumb
.md-focus-ring
I didnĀ“t tested all the functionality of the slider. But basically you have to overwrite all the styles from the slider. You can find them at the git repo
Additional, you can custom the color of balloon on the md slider by this code:
#red-slider .md-sign, #red-slider .md-sign {
background-color: blue;
border-top-color: blue;
}
#red-slider .md-sign:after, #red-slider .md-sign {
border-top-color: blue;
}
This can change the color of balloon as you neeeded
Related
I've been trying using styled-components -
const StyledButton = styled(Button)`
.and-btn-primary[disabled] {
background-color: red;
color: red;
}
`;
but it doesn't work
Please check out this topic
In your case you can override your css like this:
.ant-btn-default:disabled{
background-color: blue;
}
I ended up using -
:disabled {
background-color: blue !important;
}
to override antd
I would like to style the p-dialog's Close Icon. The default 'x' button is in grey color and I would like to change it to white color with font-size increased. I found that we could use .p-dialog-titlebar-close but haven't been successful. I used it in the following way-
::ng-deep .p-dialog .p-dialog-titlebar-close {
color: #fff;
font-size: 16px;
}
Please let me know how can I change the 'X' to show in white color. ( Since it currently is barely visible). Greatly appreciate any help. Thank you in advance.
Attaching the screenshot for detailed explanation.
I tested with the following and it works as expected:
:host ::ng-deep .p-dialog-header-close-icon {
color: red;
font-size: 2rem;
}
in my current project I encountered the problem that I need to change the color of the underline with SCSS, before I did this using the palette in themes.
For now I got a line to display using the following code.
.input {
border-bottom: 1px solid red !important;
}
But this is obvisously only a workarround. has anyone any idea how to disable the underline (the snippets utilizing the input props didn't work for me) or changing the color palette?
Edit:
I found a solution. I just added
div::after{
border-bottom: 2px solid red !important;
}
div::before{
border-bottom: 1px solid grey !important;
}
to the code and now it works :D
Kind regards,
Frodo
I've tried changing the Background-color of tristatecheckbox as shown below. The said codes will work if I directly update the CSS in the web console. But when I applied it in my codes. it won't work.
.fa-check:before {
Background-color: green !important;
}
.fa-close:before {
Background-color: red !important;
}
Can anyone, help me with this?
You need to prepend your CSS with :host >>>:
:host >>> .fa-check::before {
background-color: cyan !important;
}
:host >>> .fa-close::before {
background-color: magenta !important;
}
Note that I've changed the colors since green & red are the defaults.
Plunker example
Angular material allows us to configure themes to give a custom colour to <md-tabs>, or for that matter any of it's components.
Is there any way I can make these tabs look transparent so that I can view the background image?
Applying an inline style doesn't help.
Is this what you mean? CodePen
CSS
#background {
background-image: url("http://images.photowall.com/products/44352/rural-forest?h=700&q=92");
height: 100%;
}
.tabsdemoDynamicHeight md-content md-tabs {
background: transparent;
border: none;
}
#myTabs md-tabs-wrapper {
background: transparent;
}
#myTabs md-tab-content {
background: white
}
Markup
<md-tabs id="myTabs" md-dynamic-height="" md-border-bottom="">