Why does reboot.scss is over ridding css style sheet? - font-family

<h1>Meet new and interesting dogs nearby.</h1>
in CSS
h1 {
font-family:'Montserrat';
font-size: 3rem;
line-height: 1.5;
when it was inspected reboot.scss has overridden the CSS and rfs.scss is also overridden.
Why was it overridden? Making my CSS styling not appear.

Related

Change QGIS Plugin theme to grey

I am designing a QGIS plugin. I am struggling to make the outer region of the UI to be grey (see image).
The QT file is:
A reference UI that I want to make my UI look like, all non-functional space is grey:
You simply need to add a stylesheet to your plugin. Right click on your widget and select 'Change stylesheet'. Add this stylesheet for turning your QTabWidget to grey.
QTabWidget {
border: 0px transparent black;
}
QTabWidget::pane {
border: 1px solid #76797C;
padding: 5px;
margin: 0px;
background-color: #D3D3D3;
}

Override CKEditor 5 content edit css

I'm using CKEditor 5 in Angular 7, Classic build.
All working fine except that the p tags in the content edit area have this css applied:
p {
display: block;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
}
Which results in a big vertical margin between paragraphs in the content edit area.
I've been going through the documentation but haven't found a clear answer as to how I can remove or override this css. In previous versions of CKEditor the css file was easily accessible and overridden, but in version 5 not so - it seems I may have to do a custom build, which I'm hoping to avoid.
Before I go down that route - has anyone else come across this? Any other solutions or recommendations?
Thanks in advance :)
You should use :host ::ng-deep to override it with css.
Example:
:host ::ng-deep .text {
p {
margin-bottom: 20px;
}
h2 {
margin-top: 40px;
margin-bottom: 10px;
}
h3 {
margin-top: 25px;
margin-bottom: 5px;
}
h4 {
margin-top: 20px;
margin-bottom: 5px;
}
}
<ckeditor class="text" [editor]="textEditor" [config]="config"></ckeditor>
I'm using CKEditor 4 and I don't know if the source tab is still available in that version. If so, you have to edit ypur ck.config file and add CKEDITOR.config.allowedContent = true. After that, you can now paste a style in the source tab

Using sass function with !important

I'm using Bulma CSS framework and they use !important on some color styles.
Basically it has this:
.has-text-grey-light {
color: #b5b5b5 !important;
}
I wanted to override that color on hover like this in my SASS file:
.content ul{
list-style-type: none;
margin:0;
padding:0;
li{
a{
&.has-text-grey-light:hover{
color: lighten($grey-light, 15%) !important;
}
}
}
}
but the !important rule makes it fail to compile. Any idea if we can use !important with SCSS functions?
stupid Me! it was because I had put the wrong color format and not because of !important. But being in a rush, I didn't read it fully and just assumed it was because of !important. It's working now.

Barryvdh/laravel-dom-pdf Issues with html entities and random CSS

I am using this excellent package: https://github.com/barryvdh/laravel-dompdf
To download a view to a customers computer.
$pdf = PDF::loadView('doc_generation.mot', ['car' => $car]);
return $pdf->download($vrm .' MS.pdf');
Everything works fine, but no html entities are being shown on the pdf. Have tried the tick itself, and ✔ but both don't show.
I also have a div:
.number-plate {
background: #FFD307;
padding: 16px;
border: 1px solid #999;
font-size: 36px;
font-weight: 700;
border-radius: 5px;
}
Where the padding isn't shown on the output PDF. Although padding used elsewhere on other selectors is fine.
Anyone know how to fix these issues?

Icon Fonts in Shadow DOM

Is there a recommended way to let Icon Fonts (eq. FontAwesome/Octicons) bleed into the Shadow DOM?
At the moment, when I want to use an icon in a custom element's Shadow DOM I have to include parts of the ociticons.css file inline in the Shadow DOM:
#shadowroot
<style>
.octicon, .mega-octicon {
font: normal normal normal 16px/1 octicons;
display: inline-block;
text-decoration: none;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.mega-octicon { font-size: 32px; }
.octicon-search:before { content: '\f02e'} /*  */
</style>
<button>
<span class="mega-octicon octicon-search"></span>
</button>
(Apparently, #font-face does bleed into the Shadow DOM.)
No, there is no “recommended way” to use icon fonts just because those are simply a bundle of css and shadow DOM is intended to hide light css. So your request contradicts the purpose of shadowing.
The common approach is to build the component for showing font-related icons. Every custom component library has in fact it’s own component to show font-icons. Just google for font-awesome polymer or like. A random example.
Sidenote: #font-face does not bleed into shadow. It’s the directive setting the relation between fontname and the file where this font to take from, for those fonts which are not known to browser yet. That said, whether you’d try to declare:
#font-face {
font-family: my-octicons;
src: url('octicons.otf');
}
and then use it like:
font: normal normal normal 16px/1 my-octicons;
in shadow, it won’t be resolved. The reason it’s resolved in your case is that the browser knows where to take the font to show. In general, it’s the same case as if you were declaring:
font: Helvetica;
without any #font-face in before.
Hope this helps.

Resources