React-slick: Easy way to change arrow color ? Not the background color

Created on 6 Jul 2017  路  8Comments  路  Source: akiran/react-slick

I want to change the inner arrow color. In the demo the browser has the css as

font-size: 20px;
    line-height: 1;
    color: #00558B;
    opacity: .75;

how do i replicate this? Is there an easy way to change this color property? I have no issue with custom arrow changing background, but i only want to change arrow color.

https://jsfiddle.net/9raxke45/

Cheers!

Most helpful comment

Just target the button's contents directly like this:

.slick-prev:before,
.slick-next:before {
  color: yellow;
}

https://jsfiddle.net/ss6LedtL/

image

All 8 comments

Just target the button's contents directly like this:

.slick-prev:before,
.slick-next:before {
  color: yellow;
}

https://jsfiddle.net/ss6LedtL/

image

Ah thanks for the quick response :)

@radiovisual
When i add style to component directly dosenot work and when but it in styles in assets folder it work
thanks a lot

If you want to change the component directly without changing anything in slick.css, you can add !important next to the color like this:

.slick-prev:before,
.slick-next:before {
  color: red!important;
}

which place include this? like my style.css or nodemodules ?

Try adding it to style.css

@ieatcrayolaaa sorry but it not working directly any other way to solve this issue

This is incorrect when using react and typescript. You have to make an override stylesheet, CSS, not SCSS and include that to over write the styles.
import './YourCss.css'

and then you can over ride the default styling.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darkalor picture darkalor  路  4Comments

laveesingh picture laveesingh  路  3Comments

eternalsky picture eternalsky  路  3Comments

walker-jiang picture walker-jiang  路  3Comments

will88 picture will88  路  3Comments