In laravel 8/ coreui 3.4 app page news
<x-layouts.news>
<x-slot name="title">{{ trans('News') }}</x-slot>
...
<div class="news-content">{!! Purifier::clean($news->content_shortly) !!}</div>
...
</x-layouts.news>
is based on common app layout/css with resources/views/layouts/news.blade.php
template which has 2 css files include :
...
<link rel="stylesheet" href="{{ mix('css/app.css') }}">
<link rel="stylesheet" href="{{ mix('css/news.css') }}">
...
Problem is that when content_shortly of news has and tags they are not rendered on the form and checking
the page in browser I see that these styles are used from parent html * { : https://prnt.sc/tiYMT3I1NFEo
If there is a way to remove these html * { rules on my page BUT without editing css/app.css,
but only news.css, as these rules are used on other pages of the app ?
2
Answers
You can add
!important
flag in your CSS file.It will override the your parent CSS.
use unset for every rule that you want to remove:
https://developer.mozilla.org/en-US/docs/Web/CSS/unset