Override background-color in <html> tag with Vue-Material - vue-material

I am using Vue-material with the default theme.
This theme adds a background-color on the <html> as below -
Is there an easy way to change this to white? I do not want to change anything else in the theme, so I don't know if it makes sense to customise the theme. Though I tried to customise the theme using instructions from here but no success. I just couldn't figure out where to include the customisation code snippet as demonstrated in the link.

Why don't you just write the style to have your own background color:
html.md-theme-default {
background-color: white;
}

Related

Vue Antd Can't change ant-input-suffix style

I would like to change the style of the clear input icon, but can not change it.
<a-input placeholder="Basic usage" allowClear />
In my css, I use the classname ant-input-suffix and write
.ant-input-suffix{
background-color: #ffa;
}
Classname ant-input-clear-icon doesn't work either.
What can I do to change it?
What you are running to is probably a specificity (what is specificity in css) problem.
To fix your problem (if it is specificity) you can do:
span.ant-input-suffix {
background-color: #ffa;
}
To better target your elements we would need to see more HTML before giving a concrete answer

Change background color of ion-page element only, not descendent elements, in Ionic Vue

I have an Ionic Vue3 app. I'd like to change the background color of the whole page. I'm new to Ionic but I believe the way this has to be done (due to the use of Web Components/Shadow DOM) is to modify the --ion-background-color CSS custom property rather than trying to set the value of the normal CSS property, so this works:
.ion-page {
--ion-background-color: red;
}
...but this doesn't:
.ion-page {
background-color: red;
}
Fine, so I do the former, but the problem now is that all elements within the page (everything inside the <ion-page></ion-page> element which use that same custom property value now inherit the same background color.
Does anyone know how to scope the change of background colour of the ion-page element such that it doesn't cascade through descendent elements? Thanks :)
The solution here was to use local CSS custom property --background rather than the global property --ion-background-color. So the following works:
.ion-page {
--background: red;
}
I didn't previously realise there were different sets of CSS variables for different scopes.

How to change width of a sidebar in docusaurus

I want to change the sidebar width in docusaurus, I am only allowed to change the width of sidebar in a particular page.Can anyone suggest me a solution
In version ~2.0.0 you can create your own CSS files (/src/css/custom.css) by defining it in the docusaurus.config.js. There you can set your override styles. When inspecting the page, there's Docusaurus sets the variable for --doc-sidebar-width: 300px; I was able to override that variable with an !important:
:root {
--doc-sidebar-width: 250px !important;
}

adding background colour to webpage

new to ASP.net core, how do I add background colour to the page using the cshtml? I am using the automatically generated page but this is invariable white with black text and it doesn't seem to like the use of inline.
In .net core application,there is a default layout in shared/_layout.cshtml.And each view will use the layout.And in _layout.cshtml,we often reference site.css in <head></head>.So if you want to change the background color of all the pages,you can change the style in site.css.Also, you can change the style in _layout.cshtml by.
For example,I change the background color of body:
In site.css:
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
background-color:red;
}
In _layout.cshtml:
<style>
body {
background-color:red;
}
</style>
Result:
You could also do something like...
<body style="background-color:red">

How to Change background colors on only one page on Squarespace Henson template?

I try everything on this and other forum to do it and not ask people..
But nothing happened! haha
I would like to know if someone here know how to change the background colors on Henson template on Squarespace ? (So also all the texte of the page).
I try this in the CSS section but it didn't worked.
#collection-5e827250f835166c09c3dcbe
{background-image:url("https://static1.squarespace.com/static/5c3a93e22487fd34bb34eaa9/t/5ea1dd8bda93e023950c5bcf/1587666340724/Background.jpg");
background-size:cover;
background-position:center;
}
And i try this in the injection code :
<style>
#collection-5e827250f835166c09c3dcbe {
background-color:#000;
}
</style>
Thank you in advance,
hope someone can help me!
The Henson template has a "title-card-overlay" that, if enabled, makes it non-obvious to change the initial background color of a the page.
To change the background color of a specific page, add the following CSS via the CSS Editor/Custom CSS:
#collection-57ae1156e3df28c4ce90ea48 .main-content {
background-color: #000000;
}
#collection-57ae1156e3df28c4ce90ea48 .title-card-overlay {
background-color: #000000;
}
Of course, in the above code, change the collection ID 57ae1156e3df28c4ce90ea48 to the ID of the page in question.