How to remove rules from css/app.css with my css file? |
How to remove rules from css/app.css with my css file? |
nilovsergey |
Jul 15 2023, 11:46 AM
Post
#1
|
Newbie Group: Members Posts: 10 Joined: 15-July 23 Member No.: 28,988 |
In laravel 8/ coreui 3.4 app page news
CODE <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 : CODE ... <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 <i> and <strong> 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 I search a way to remove these html * { rules on my page BUT without editing css/app.css, As I encountered this problem when user fills CODE <i> and CODE <strong> tags in ckeditor5 I added at top of my scss CODE strong { font-weight: unset; } i { font-weight: unset; } I tried to add style : CODE html * { font-weight: unset !important; text-decoration: unset !important; font-style: unset !important; } * { font-weight: unset !important; text-decoration: unset !important; font-style: unset !important; } But that also did not help - <i> and <strong> tags are not rendered at all... |
pandy |
Jul 16 2023, 04:44 AM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,736 Joined: 9-August 06 Member No.: 6 |
I haven't really looked into the unset keyword and don't know how it fairs with inheritance, which would matter in the second example of what you tried. In your first example I think your selector has too low specificity. See if either using a more specific selector or to add !Important helps.
CODE strong { font-weight: unset !Important; } |
Lo-Fi Version | Time is now: 8th June 2024 - 07:42 PM |