I'm currently working on a navbar (with a dark red background color) where the subsequent submenus have a light grey background color.
I'm using Scss and have managed to get the focus to work with the code bellow:
%focus {
#include focus-style(map-get($colors, "muted"), $focus-offset);
}
The color muted is connected to list of globally defined colors (in this case #636466) and focus-offset pulls the outline in by -2px.
The problem that arises is that there isn't enough contrast between the "muted" outline and the dark red background on the main navbar. I'm wondering how I'd go about adding a white outline when focus is on the main navbar and the "muted" color when it's on the grey submenus?
In light mode, when I hover over a word ( without selecting ), the entire background color of the paragraph turns light blue 👇.
but when I turn on dark mode (using dark reader extension) it is hard to find the hovered paragraph because of poor color contrast.
to make the background color of hovered text blue, I manually add this css code to the "dev tools" of dark reader
.ryNqvb:hover{
background-color: #007FFF;
}
and here's the resault:
but the equivalent english paragraph doesn't changes... I can't find the appropriate class or id to change the inputted text(english one)...
I wanna both paragraph becom blue 👇 what is the solution?
I'm on Bootstrap 4 and having a light colour .png image as background of navbar and body, while the footer area is in dark with off-white text colour. The default text colour is black, as the background image is light coloured.
The things get ugly when a user accesses the website on dark theme. The text colour on dark theme gets changed into light colour while the background image remains as light that leaves the text unreadable.
See below the text presentation in light and dark themes:
text on default (light) theme
text on dark theme
Can I keep my text colours unaffected irrespective of the theme of the users? Thanks in advance!
I got it fixed by simply using a transparent texture .png in place of a colour-filled texture .png image as background, with an adjustment in body {background:} colour.
I'm trying to create an application where the theme or background color of the application changes on changing the slider position. The color changes within specific range of hex color codes.
For example: In Dark mode of an application, if I move the slider then background color changes to different shades of dark mode either brighter shades or darker shades of dark mode
use the valueProperty() method of the slider call .addListener(observable->{}) and in the {} set the background color according to the getValue() value of the slider. How you convert value to background color is left for u to figure out.
Using black tint with light_content style:
forge.topbar.removeButtons()
forge.topbar.setStatusBarStyle("light_content")
forge.topbar.setTint([0,0,0,255])
Adding buttons. Images are black on transparent .png's:
{
icon: 'images/info.png'
, tint: [255,255,255,255]
, position: 'right'
}
This works for iOS7, however in iOS6 shows black on a white background within the button. I've tried reversing the image, white on transparent, white on black - and I can't get white on black button images to work on both iOS6 and iOS7.
Is there a way to create the images or specify the forge API calls to get this to work? Or is it a bug in the forge topbar implementation?
This is due to changes in the underlying way iOS 7 displays both the topbar and tabbar. The API provided by Trigger tries to be as close as possible between versions, but it sometimes has to appear differently to support new platform features.
The easiest way to do what you want is to detect iOS 7 and run different code, you can do that as follows:
if (navigator.userAgent.match(/(iPad|iPhone);.*CPU.*OS 7_\d/i) !== null) {
// iOS 7 specific code
} else {
// iOS 6 and lower specific code
}
For white on black buttons (based on white (or black) on transparent png) toggle the tint based on user agent detection provided by Connor:
var tint = (navigator.userAgent.match(/(iPad|iPhone);.*CPU.*OS 7_\d/i) !== null)
? [255,255,255,255]
: [0,0,0,255];
Also, image size for topbar icons should be 44x44 pixels, not 64x64 as may be inferred from the documentation.