Tailwind Vendor Prefixes - tailwind-css

Is there a way to use vendor prefixes in tailwind css?
.search::-webkit-search-cancel-button{
display: none;
}

Related

Tailwindcss with postcss and css modules

I was thinking that Tailwind CSS with CSS modules / post css will work nicely together. to write less code and generate less CSS but...
when I used tailwind with #apply it just applies styles to that class
example
.root {
#apply flex align-center;
}
from styles.root to "root flex align-center"
but instead it just add css to .root class
I think that it should work as composes: flex align-center from global;
Is my configuration wrong or it's just working in that way?
That is just how the #apply directive works. #apply is used to inline any existing utility classes into your own custom CSS.
/* Input */
.root {
#apply flex items-center;
}
/* Output */
.root {
display: flex;
align-items: center;
}

Why setting a CSS role with :host ::ng-deep into an angular component CSS is not working?

I am not so into Angular and CSS and I have the following poblem trying to define a CSS related to a specific component (into the .css file of a component).
If I do in this way:
.p-column-title {
display: none;
}
it works fine. But if I do in this way (I obtained it from the PrimNG showcase example):
:host ::ng-deep {
.p-column-title {
display: none;
}
}
The CSS style is not applied.
Why? What is wrong? From what I have understand the :host ::ng-deep is used to let be global style the CSS role...so maybe it is not the correct way declare in this way into the CSS of a specific component.
I think that I am missing some piece...
I think you have to make it like this:
:host ::ng-deep .p-column-title{
display: none;
}

how can i override ngx carousel css to disable navigation

I am using ngx carousel in my angular project and want to disable navigation arrows .I have already tried following code but none worked
.carousel-control {
display: none;
}
it looks like my css is not able to override the ngx bootstrap css.
can anyone help me with this
try
::ng-deep .carousel-control {
display: none;
}
But FYI ng-deep is not a good way of doing things, ideally there is should be #Input field in that ngx carousel so you can configure navigation.
you can use
:host ::ng-deep {
.carousel-control {
display: none;
}
}
If the ::ng-deep combinator is used without the :host pseudo-class selector, the style can bleed into other components.

Whats the difference between /deep/ ::ng-deep?

Could you please tell me, the differences between the below two scss styles?
I didn't get the clear idea about this.
:host {
display: inline-block;
/deep/ {
span {
color: red;
}
}
}
:host {
display: inline-block;
::ng-deep {
span {
color: red;
}
}
}
The main difference is, that ::ng-deep is supported by SASS, while support for /deep/ was removed. This is the reason why ::ng-deep was added to Angular in addition to /deep/
Besides that, both are deprecated in Angular, because when native shadow DOM support in all browsers becomes usable, they will probably remove ViewEncapsulation.Emulated

Can I mix CSS and SCSS on the same style sheet?

I have just found SCSS and am thinking it would be useful on a site I am currently developing (I'm about 50% done) and that it would be a good way to make some of my existing CSS tidier and easier to read.
My question is can I rewrite parts of my existing CSS as SCSS and leave the rest as CSS? Can I have both CSS and SCSS in the same stylesheet or does it have to be all SCSS or CSS?
SCSS is a pre-processor of CSS, so yes you can mix, as long you use the files ending in .scss
Although I advise you to read the SASS Docs and use it in a proper way.
see this below and the SASS demo:
SCSS
.test {
div {
color:red;
}
}
div span {
background:blue;
}
CSS
.test div {
color: red;
}
div span {
background: blue;
}
yes, that's perfectly fine, no problem.

Resources