kevinoleary19 / Angular-2-Datepicker

A minimalist datepicker inspired by Google's material design
70 stars 71 forks source link

How extend or override style input. #67

Open mynameiskreang opened 7 years ago

mynameiskreang commented 7 years ago

Hello, I try to extend, override component and CSS. but it's not work.

I want to change your input style to right style. how can I do?

screenshot from 2017-02-01 01 18 33

Thanks.

bulat-f commented 7 years ago

Hi @greedmonkey . Just use in css something like this:

.datepicker__input {
    border: 0 !important;
    border-bottom: .2rem solid !important;
    border-radius: 0 !important;
}

If you have this styles for other inputs already, you can override inline styles using !important there. For example:

input {
    border-bottom: .2rem solid !important;
}
ibrcic commented 7 years ago

The solution simply does not work for me. As a matter of fact no matter what I try the input styling remains the same. Any tips for me?

HugRios commented 7 years ago

you can go to datepicker.component.ts in this file you should find this and change the styles of input

.datepicker__input {
    outline: none;
    border-radius: 1.1rem;
    padding: .2em .6em;
    font-size: 14px;
  }

I hope this helped you

mariogl commented 7 years ago

Same issue here. If I override input styles inside my component, they are ignored. If I override them in a global stylesheet, then it works (not a clean solution for me).

I'm building the app with webpack (angular-cli).