My developed plugin’s css is overriding by theme’s style.css
I have built a chatbot. But its text field has color background: #f4f7f9;
which is getting override by Astra’s selectors and giving it background: #fafafa;
. I am using the Astra theme and by looking at the inspect element its
input[type="email"],
input[type="number"],
input[type="password"],
input[type="reset"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="url"],
select,
textarea {
color: #666;
padding: 0.75em;
height: auto;
border-width: 1px;
border-style: solid;
border-color: #eaeaea;
border-radius: 2px;
background: #fafafa;
box-shadow: none;
box-sizing: border-box;
transition: all 0.2s linear;
}
Is Overriding My
.Chat_TextField {
background: #f4f7f9;
width: 85%;
/* margin-bottom: 15px; */
border-top: 0px solid #ccc;
position: relative;
padding-top: 10px;
padding-right: 10px;
padding-bottom: 10px;
padding-left: 15px;
border: none !important;
resize: none;
outline: none;
/* border:1px solid #ccc; */
color: #888;
/* border-top:1px solid #ccc; */
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
overflow: hidden;
}
However, all properties are not getting overridden but some of them ARE.
Points To Be Noted:
My Bot CSS file FD_Chatbot_Style.css
is getting loaded after the style.css
. So it should give more precedence to my CSS file instead of the style.css.
If I add !important tag to background: #f4f7f9;
in my FD_Chatbot_Style.css
. It not get overriden.
If I delete the Style.css through the inspect element everything works fine then.
I have given 999 priority when adding my CSS file with wp_enque. But loading, in the end, does not help.
PS: I AM STUCK ON THIS FOR A DAY. TON OF REASERCHING DID NOT HELP.
Leave an answer
You must login or register to add a new answer .