Operating System: Windows
DocFX Version Used: 2.56.1.0
Template used: default
I was finding a way to change the default icon that shows up by the side of the toc items which is a "+" sign and which becomes a "-" sign once the list item is being expanded. I want it to be a right arrow which rotates into a down arrow while expanding the toc. I tried to modify the docfx.css file where this thing is mentioned like this (using glyphicon-menu-right):
.toc .nav > li.active > .expand-stub::before,
.toc .nav > li.in > .expand-stub::before,
.toc .nav > li.in.active > .expand-stub::before,
.toc .nav > li.filtered > .expand-stub::before {
content: "\e258";
transition: transform .1s ease-in-out;
transform: rotate(0deg);
}
.toc .nav > li > .expand-stub::before,
.toc .nav > li.active > .expand-stub::before {
content: "\e258";
}
But the icons dont show up in the docfx site. What should I do regarding the same?
I was able to change them successfully using lines 512-522 in default/styles/docfx.css:
.toc .nav > li.active > .expand-stub::before,
.toc .nav > li.in > .expand-stub::before,
.toc .nav > li.in.active > .expand-stub::before,
.toc .nav > li.filtered > .expand-stub::before {
content: "x";
}
.toc .nav > li > .expand-stub::before,
.toc .nav > li.active > .expand-stub::before {
content: "y";
}
In theory, you should be able to paste this code (with your adjustments) in default/styles/main.css, and it will override the default CSS in default/styles/docfx.css.
This did not work for me until I put main.css in a custom template, but that could be my particular configuration, or my lack of understanding:
From directory root, add: template/styles/main.css
In docfx.json, add template:
"template": [
"default",
"template"
],
Also, make sure any fonts are referenced in the head partial (which may also need to be added to template/partials/head.tmpl.partial).
Related
Hello I need to add space between the li items on my toggle open menu, I can't find the class, I've try to give them padding to the next classes; .navbar-nav .open .dropdown-menu, .navbar-nav .open .dropdown-menu > li > a, and other more. It doesn't do anything.
Here is the image:
Checking the link you provided, you could easily access the li elements by targeting the ID provided by bootstrap and selecting the child elements like this:
#menu_my_bootstrap_menu_settings_menugoc2_container ul li {
padding: 10px 0; /* Or any other values */
}
I'm trying to add color to an element to match the default color of selected values in drop down lists. What is the color code for this? I can't seem to find any information online.
Use this type css
ul > li.active > a, ul > li > a:hover, ul > li > a:focus {
color:black; /*as you wish*/
}
I am attempting to override a Bootstrap specification. I have a scaffold file ahead of the Bootstrap file. However, the Bootstrap specification is being selected, providing White instead of Green. Why is this happening?
I understand that the A tag has 4 pseudo classes: link, hover, active and visited. I am just dealing with reality and Bootstrap.
The selector is:
.navbar-inverse .navbar-nav > li > a:focus
The combined CSS file has these related specifications in this order:
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus,
.navbar-inverse .navbar-nav > li > a:active {
color: green;
background-color: transparent;
}
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
color: #fff;
background-color: transparent;
}
A picture of the selection:
All help appreciated.
This does make sense, right? The latter spec overwrites the first one. You have two options:
Change the order of the declarations;
Make your spec more specific (a more specific selector, or use !important if you need a last resort).
Try adding
!important
Add the end of you css line That is overwritten. Or change the order of your css.
I'm using Angular to let the user change the color of a bootstrap navbar. The actual background color change itself is simple enough, but I also want to change some related elements like the border-color and some of the shadows.
What I have:
<nav class="navbar navbar-default" ng-style="{ 'background-color': user.topBarBackgroundColor }">
How would I go about using user.topBarBackgroundColor to define some shade (e.g. a darker shade) for the navbar's border, highlighted lis, etc?
Note that the text color can be changed independently, so any methods should apply to that in parallel as well.
EDIT
I only need this to work in modern browsers, so any adopted CSS3, HTML5, etc is fair game
I solved this by creating a .navbar-rgba-colors class and adding it to the .navbar element. The CSS (LESS) below overrides the relevant bootstrap defaults:
.navbar-rgba-colors {
border-color: rgba(0,0,0,0.2);
.navbar-nav > li > a,
a.navbar-brand {
opacity: 0.7;
}
.navbar-nav > li:hover > a,
.navbar-nav > li > a:focus,
.navbar-nav > li.active > a,
.navbar-nav > li.active > a:hover,
.navbar-nav > li.active > a:focus,
.navbar-nav > li.open > a,
.navbar-nav > li.open > a:hover,
.navbar-nav > li.open > a:focus
a.navbar-brand:hover,
.navbar-header:hover > a,
a.navbar-brand:focus {
opacity: 1;
background: rgba(255, 255, 255, 0.1) !important;
}
}
The opacity change makes the text appear brighter on hover, while the background makes the focused/active a element appear lighter as well.
Then I implemented in the HTML like so:
<nav class="navbar navbar-default navbar-rgba-colors" ng-style="{ 'background-color': user.topBarBackgroundColor }">
and for any a elements within the navbar:
<a ... ng-style="{ color: user.topBarColor }">Home</a>
Now changing the hex values for topBarBackgroundColor and topBarColor changes the background color and text color of the navbar, respectively. I'm using angular-bootstrap-colorpicker for that and it seems to be working well.
I was working on this site MY Site . the menu bar shows a black color on hover .I need different colors to show on each menu item hover.I have tried the following code in my css but didn't work
nav.main_menu>ul>li:hover>a span:nth-of-type(1){background-color:#161f30 !important;} nav.main_menu>ul>li:hover>a span:nth-of-type(2){background-color:#161f30 !important;}
also i tried
nav.main_menu>ul>li :nth-of-type(1):hover >a span{background-color:#161f30;}nav.main_menu>ul>li :nth-of-type(1):hover >a span{background-color:#161f30;}
this also didn't work.can anyone please help me to achieve this? Please!! Thanks!!
Try this css
nav.main_menu > ul > li:nth-child(1):hover {
background:#ff0000 !important;
}
nav.main_menu > ul > li:nth-child(2):hover {
background:#ff00ff !important;
}
nav.main_menu > ul > li:nth-child(3):hover {
background:#ff0ff0 !important;
}
nav.main_menu > ul > li:nth-child(4):hover {
background:#ff0aa0 !important;
}
nav.main_menu > ul > li:nth-child(5):hover {
background:#ff0eee !important;
}
nav.main_menu > ul > li:nth-child(6):hover {
background:#ff0dd0 !important;
}
Try the following
.main_menu > ul > li:nth-child(1):hover > a span {
// styles
}
Better is to add classes to your nav elements.
.main_menu-home { // styles }
.main_menu-artists { // styles }
and so on