Bruno Miguel
Bruno Miguel

Reputation: 1115

Add styling to an angular custom component

I have created a custom angular component e.g. my-component and in its css file i have the following:

:host {
    display: inline-block;
    width: 55px;
}

Then in some components template i want to use my-component and add some style to it like so:

 <my-component class="my-class"></my-component>

CSS file:

.my-class {
    border-radius: 4px; // NOT WORKING 
    box-shadow: 0 5px 9px 0 rgba(192, 195, 197, 1); // WORKING

    position: relative; // WORKING
    top: 30px; // WORKING
}

I cant figure it out why the border-radius is not applied!

Upvotes: 0

Views: 331

Answers (1)

Muhammad Kamran
Muhammad Kamran

Reputation: 1027

I believe you need to add border first. Like

border: 2px solid black;

And then add border radius.

Upvotes: 3

Related Questions