How to change width of a sidebar in docusaurus - 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;
}

Related

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.

Override background-color in <html> tag with 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;
}

I want to change carousel-item.active display property

I want to change carousel-item.active display property block to flex.I change it in css but when I change slider it first gives display:block than make my cude run.display:flex,I want that bootstrap doesn't give display:block than display:flex.Give only display:flex
Set your CSS like this:
.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
display: flex;
}
The carousel-item-next and carousel-item-prev classes are temporarily assigned to your slides during the transitions, so you have to make sure they have the same display property as the active slide.
If this isn't working, what version of Bootstrap are you using? I have tested it in a JSFiddle.

Bootstrap select inside modal don't show properly

Here is the fiddle. I've put a Select box as sample. It seems that it can't be shown inside modal. How can be it solved?
...................................................Update.....................................
To solve this, I've added this CSS:
.bootstrap-select.btn-group .dropdown-menu.inner {
position: static;
}
Now, the Select-Option are showing, but it seems that the dropdown taking the real space which increasing the height of popup. But, I expect dropdown will cross the popup window if the height of dropdown is much. How can I make it?
Updated Fiddle
See the updated jsFiddle: http://jsfiddle.net/mijopabe/gj9axc18/5/ You need to add this to your CSS:
.modal { overflow: visible; }
.modal-body { overflow-y: visible !important; }
I also took the liberty of including the plugins corresponding CSS file from a CDN:
//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.3/css/bootstrap-select.css

set the color of a blueprint div

Is there a way to set the background colour of a div in blueprint?
I noticed that class=error will set the colour to pink (notify/success are similar):
<div class="error">
<p>whatever</p>
</div>
But I want to know if there is a way to set the div to some arbitrary color?
EDIT: I don't actually care about error/notify/success. I just want to be able to set the color of a div in a similar way that they do, but using a color of my choice.
Time to state the obvious - why can't you just override the div.error rule with your own?
div.error { background:black; color:#fff; } .. or are you not trying to break some sort of weird convention? If so you can use a different classname.
Just... define your own CSS class and set the background and/or (for font color) color properties to color values; then set a div to have that as one of its classes?
Yes, you can easily over-ride the CSS by specifying a rule for error in your main CSS file.
That should ideally over-ride the default colors. Else, just ensure that you use a higher specificity in your rule, something like: div.container div.error { color: red; }
You can set any color on this particular div by adding an id attribute:
<div class="error" id="myblueprint">
<p>whatever</p>
</div>
Then add in your CSS file:
#myblueprint { background:blue; }