Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    GIF shows where to locate </> in the thread and or post editor toolbar.
    To learn more about how to use our BBCode feature, review our "How to post your code into threads" here.

    Thank you, Code Forum.

> How to remove rules from css/app.css with my css file?

In laravel 8/ coreui 3.4 app page news

HTML:
<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 :

HTML:
...
<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 * { : Screenshot

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


CSS:
<i>

and

CSS:
<strong>


tags in ckeditor5

I added at top of my scss


CSS:
strong {
font-weight: unset;
}

i {
font-weight: unset;
}
but that does not work anyway and in browser I see : Screenshot


I tried to add style :
CSS:
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...
 

Buy us a coffee!

Buy me a coffee.
Back
Top Bottom