correct syntax for sass bootstrap override menu code - css

I'm working on a custom bootstrap menu and for some reason, I can not change any styles of the menu item once the user is on the item.
Is there something wrong with my syntax, its Monday morning so maybe I'm tired and have a simple mistake but I can't see it.
.navbar-inverse {
.navbar-nav {
padding: 10px !important;
a {
&:hover {
border-bottom: solid green 3px !important;
color: $my-white !important;
font-weight: bold;
background-color: transparent !important;
}
&:active {
border-bottom: solid green 3px !important;
color: $my-white !important;
font-weight: bold;
background-color: transparent !important;
}
&:focus {
border-bottom: solid green 3px !important;
color: $my-white !important;
font-weight: bold;
background-color: transparent !important;
}
}
}
}
I can work it with css, for example
.navbar-inverse .navbar-nav>.active>a, .navbar-inverse .navbar-nav>.active>a:focus, .navbar-inverse .navbar-nav>.active>a:hover {
border-bottom: solid green 3px !important;
color: $my-white !important;
font-weight: bold;
background-color: transparent !important;
}
but not in sass, why is this ?

Related

Change color of selected date in react-datepicker

I need to changemy react-datepicker color of selected date to another color. How can I select this range of date in css?
.react-datepicker {
font-family: RobotoMedium;
font-size: 14px !important;
color: #c7c7c7 !important;
&__header {
background-color: $white !important;
padding-top: 0px !important;
border: none !important;
}
&__day-name {
color: #c7c7c7 !important;
font-size: 14px !important;
}
&__day {
color: $black !important;
font-size: 13px !important;
&--keyboard-selected,
&--selected {
border-radius: 25px !important;
background: $dark-red !important;
color: $white !important;
}
&--disabled {
color: #c7c7c7 !important;
}
}
}
Use this scss, Change color like this.

How to change background-color of input when selected

I can't change the background-color of the input when an option is selected. When it's not is transparent.
this is when options appear in my input with transparent background
when i choose an option from before
It looks like a cyan type of color.
input {
width: 300px;
height: 30px;
outline: none;
border: none;
border-bottom: 1px solid #fff;
background-color: transparent;
background: transparent;
color: #fff;
font-size: 20px;
font-weight: lighter;
}
input:required:focus {
background-color: transparent;
}
input::placeholder {
background-color: transparent;
}
input:focus {
background-color: transparent;
}
What I've been trying so far
input:focus
{
background-color:yellow
}

ngx Pagination. Can I use with Bootstrap?

I want to ask that is possible use some bootstrap's paginatinon to ngx Pagination ? I would like to use mechanism from ngx Pagination and css from bootstrap.
You can use your own template and customise the styling if that's what you're trying to do to look like bootstrap:
https://github.com/michaelbromley/ngx-pagination#paginationcontrolsdirective
https://github.com/michaelbromley/ngx-pagination#styling
An example here:
http://michaelbromley.github.io/ngx-pagination/#/custom-template
Or you could use ngx-bootstrap :)
https://valor-software.com/ngx-bootstrap/#/pagination
Apply Bootstrap style on "ngx-pagination" Component
After installation ngx-pagination, add this style in your custom style sheet or in your component related style file
.ngx-pagination{
margin-bottom:0 !important;
}
.ngx-pagination li{
margin-right: -1px !important;
}
.ngx-pagination li.current{
background-color: #007bff !important;
border: 1px solid #007bff !important;
padding: 6px 12px !important;
z-index: 999999 !important;
position: relative;
}
.ngx-pagination li a:focus{
outline:none;
}
.ngx-pagination a, .ngx-pagination button{
color: #007bff !important;
background-color: #fff !important;
border: 1px solid #dee2e6 !important;
padding: 6px 12px !important;
}
.ngx-pagination .disabled{
color: #6c757d !important;
pointer-events: none !important;
cursor: auto !important;
background-color: #fff !important;
border: 1px solid #dee2e6 !important;
padding: 6px 12px !important;
}

Bootstrap example page not showing focus outline on tabs. How to get this behaviour

When I visit the bootstrap examples page here: http://getbootstrap.com/javascript/#tabs
I can click on the tabs and a blue focus outline (in chrome) does not appear. This is the behaviour I want. The same interaction (clicking a tab) in my application shows the blue outline.
I know there are several easy fixes (Bootstrap's Togglable Tabs - Removing outline / focus ?) to this problem (changing the css to outline: 0 for anchors), but what I can't figure out is why the bootstrap example works (doesn't outline after clicking) and mine doesn't. When I select the tabs anchor tag in dev tools, this is the css I see applied:
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {
color: #555;
cursor: default;
background-color: #fff;
border: 1px solid #ddd;
border-bottom-color: transparent;
}
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {
color: #555;
cursor: default;
background-color: #fff;
border: 1px solid #ddd;
border-bottom-color: transparent;
}
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {
color: #555;
cursor: default;
background-color: #fff;
border: 1px solid #ddd;
border-bottom-color: transparent;
}
.nav-tabs>li>a:hover {
border-color: #eee #eee #ddd;
}
.nav>li>a:focus, .nav>li>a:hover {
text-decoration: none;
background-color: #eee;
}
.nav>li>a:focus, .nav>li>a:hover {
text-decoration: none;
background-color: #eee;
}
.nav-tabs>li>a {
margin-right: 2px;
line-height: 1.42857143;
border: 1px solid transparent;
border-radius: 4px 4px 0 0;
}
.nav>li>a {
position: relative;
display: block;
padding: 10px 15px;
}
a:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
a:focus, a:hover {
color: #23527c;
text-decoration: underline;
}
a:focus, a:hover {
color: #23527c;
text-decoration: underline;
}
a:active, a:hover {
outline: 0;
}
a {
color: #337ab7;
text-decoration: none;
}
a {
background-color: transparent;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
user agent stylesheeta:-webkit-any-link {
color: -webkit-link;
text-decoration: underline;
cursor: auto;
}
user agent stylesheet:focus {
outline: -webkit-focus-ring-color auto 5px;
}
Of particular interest is that 'a:focus' specifies the outline attribute, yet I don't see the outline after clicking the tab. I've also verified that the anchor is set to focus. If I use the "Toggle Element State" feature in Chrome Dev Tools and check "focus", the blue outline appears.
The styles applied to my application's bootstrap tabs are the same, yet I see the blue outline after clicking the tab.
I ran into this same issue too. Odd how it only happens on certain browsers. I didn't have this issue with Chrome or Safari but it was happening on Firefox and IE11. This is what worked for me.
.navbar-default .navbar-nav>li>a {
outline: none;
}

Input submit wanting to change on hover with css

http://jsfiddle.net/4UA82/1/
#subscribe-submit input[type="submit"] {
text-decoration: none !important;
color: #000000 !important;
font-size: 12px !important;
padding-top: 5px !important;
padding-right: 5px !important;
padding-bottom: 5px !important;
padding-left: 5px !important;
background-color: #24890d !important;
}
#subscribe-submit input[type="submit"]:visited {
text-decoration: none !important;
color: #000000 !important;
}
#subscribe-submit input[type="submit"]:hover {
font-size: 12px;
background-color: #2b2b2b;
color: #000000 !important;
}
#subscribe-submit input[type="submit"]:active {
font-size: 12px;
background-color: #2b2b2b;
}
I am just trying to get this button to hover to the desired background color, but it is not working for some reason.
I can get it to hover if I delete the initial settings though:
#subscribe-submit input[type="submit"] {
text-decoration: none !important;
color: #000000 !important;
font-size: 12px !important;
padding-top: 5px !important;
padding-right: 5px !important;
padding-bottom: 5px !important;
padding-left: 5px !important;
background-color: #24890d !important;
}
So I am not sure what is going on.
thanks!
Remove the !important tag
#subscribe-submit input[type="submit"] {
background-color: #24890d;
}
The need to use !important on every attribute suggests that there are flaws in the way you are structuring your CSS
In #subscribe-submit input[type="submit"] Change
background-color: #24890d!important;
to
background-color: #24890d;

Resources