Change ion-input underline color in Ionic 4 - ionic-framework

How can we change the default underline color of a ion-text in only a single page in Ionic 4?

The underline is actually a part of the ion-item, not the ion-input.
ion-item {
--border-color: var(--ion-color-danger, #f1453d);
}

Ionic 4.x uses CSS Custom Properties for most of the time.
src/app/pages/test/test.page.scss
:host {
ion-item {
--border-color: white; // default underline color
--highlight-color-invalid: red; // invalid underline color
--highlight-color-valid: green; // valid underline color
}
}
If necessary, please check the other custom properties here.

For Ionic V4.X is a little bit diffrent.
You can open specific_page.scss file where you want to change ion-input border when input value is Valid o Invalid
Change the colors of the following class, like this:
:host {
.item-interactive.ion-invalid{
--highlight-background: yellow !important;
}
.item-interactive.ion-valid{
--highlight-background: black !important;
}
}

Try this css
.item-has-focus{
--highlight-background: #e2e2e2;
}

To aggregate in app.scss file
.ios {
.item-has-focus.ion-invalid {
--border-color: var(--ion-color-danger, #f1453d);
}
.ion-valid {
--border-color: var(
--ion-item-border-color,
var(--ion-border-color, var(--ion-color-step-150, rgba(255, 255, 255, 0.8)))
);
}
.custom-item {
--background: transparent;
color: #fff !important;
--background-focused: transparent;
}
}
.md.custom-item {
--background: transparent;
color: #fff !important;
--background-focused: transparent;
--border-color: var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(255, 255, 255, 0.8)))
);
}
Or use class to you custom .custom-item.hydrated.ion-touched.ion-dirty.ion-invalid.item-label.item-interactive.item-input.item-has-focus.item.ios.ion-focusable

Related

custom color in MUI dialog not working (MUI v-5)

.App {
text-align: center;
** --amenalBlue: #15426C;
--amenalOrange: #D9A460;**
}
h2,h3{
color: gray;
}
/* common table head style */
.tableHead {
*** background-color: var(--amenalOrange);***
}
.tableHead th {
color: var(--amenalBlue);
font-weight: bold;
}
Table head is not taking custom color which i have added but normal hex code is taking. This is happning in MUI table used inside MUI dialog

VScode change appearance of intellisense popup

On the website for Tailwind CSS there is a video of someone editing in vscode.
How did they get the popup to look like that? Can I reproduce it some how?
For those wanting to see the gif on their website: https://tailwindcss.com/docs/editor-setup
You are looking at the result of someone's chosen color theme in their vscode editor. You could contact them and ask for the name of that theme and whether it is available on the VSCode Marketplace or you can make your own.
Specifically for the Suggest Widget you showed in your question:
You can do this in vscode's own settings. In your settings.json
{
"workbench.colorCustomizations": {
"editorSuggestWidget.background": "#344255",
// the first line in your gif is selected
"editorSuggestWidget.selectedBackground": "#485669",
// the letters you have typed to bring up intellisense: 'bg' in your example
"editorSuggestWidget.highlightForeground": "#97f4e2",
// 'bg' in a selected entry
"editorSuggestWidget.focusHighlightForeground": "#97f4e2",
"editorSuggestWidget.foreground": "#fff" // the text color
}
}
The workbench.colorCustomizations object allows you to change the color of many of vscode UI elements. To learn more about this see
Customizing a Color Theme:
You can use IntelliSense while setting workbench.colorCustomizations
values or, for a list of all customizable colors, see the Theme Color
Reference.
So, for instance if you know that is the suggestWidget, just typing "suggestWidget" (including the quotes) inside a workbench.colorCustomizations object should give you all the properties of a suggestWidget of which you can change the color.
Thet are also listed here: Theme Color Reference: Editor Widget Colors.
[I used an eyedropper browser extension to get the colors for the various elements.]
[I assume the rounded corners are a result of MacOS, the demo below is with W11.]
It says in their guide here.
By default VS Code will not trigger completions when editing "string" content, for example within JSX attribute values. Updating the editor.quickSuggestions setting may improve your experience:
Add these settings.json
"editor.quickSuggestions": {
"strings": true
},
"tailwindCSS.includeLanguages": {
"html": "html",
"javascript": "javascript",
"css": "css"
},
Save and restart VS code.
When you want to use tailwind related classes use eg. "text-" you should see the suggestions.
You have to use vscode-custom-css extension
Install the extension and try the CSS below...
.monaco-editor .suggest-widget {
border-radius: 15px 15px 15px 15px;
box-shadow: 0 0 15px 15px rgba(0, 0, 0, 0.1);
padding-top: 15px
}
you can use Tailwind Moon theme to get similar colors also...
Use this extension: vscode-custom-css and this css:
.colorspan {
border-radius: 4px;
}
.monaco-editor .ced-1-TextEditorDecorationType24-3::before {
border-radius: 4px;
}
.monaco-editor .suggest-widget {
border-radius: 15px 15px 15px 15px;
box-shadow: 0 0 15px 15px rgba(0, 0, 0, 0.1);
background-color: #344254 !important;
padding: 10px;
}
.monaco-editor .monaco-highlighted-label .highlight {
color: #79bcb6;
}
.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused {
background-color: #485668 !important;
}
.monaco-editor .monaco-list-row:hover:not(.selected):not(.focused) {
background-color: #485668 !important;
}

How to set an image as the background for Eclipse IDE? [duplicate]

I want to put an image as background in eclipse helios's java editor.
No, you can't have a background image for the editor section of Eclipse.
To change background colour:
Open Windows > Preferences > Editors > Text Editors
Browse Appearance color options
Select background color options, uncheck default, change to black
Select background color options, uncheck default, change to colour of choice
Check this : Color Themes for Eclipse
for example: this config set eclipse 4 text editor background image (path "./eclipse-text-editor-background-image.png") from folder "eclipse-kepler-standart/plugins/org.eclipse.platform_4.3.2.v20140221-1700/images"
cat ~/eclipse-kepler-standart/plugins/org.eclipse.platform_4.3.2.v20140221-1700/css/e4_basestyle.css
.MPart StyledText {
background-image: url(./eclipse-text-editor-background-image.png);
background-color: white;
color: black;
}
.MPartStack {
swt-unselected-tabs-color: #2D3340 #2D3340 #2D3340 100% 100%;
swt-outer-keyline-color: #FFFFFF;
swt-inner-keyline-color: #FFFFFF;
swt-tab-outline: #B6BCCC;
swt-shadow-visible: true;
swt-mru-visible: false;
}
.MPartStack.active {
swt-inner-keyline-color: #FFFFFF;
swt-tab-outline: #B6BCCC;
swt-shadow-visible: true;
}
#PerspectiveSwitcher {
eclipse-perspective-keyline-color: #AAB0BF #AAB0BF;
}
.MToolBar.Draggable {
handle-image: url(./dragHandle.png);
}
.MToolControl.Draggable {
handle-image: url(./dragHandle.png);
}
.DragFeedback {
background-color: #00FF00;
}
.ModifiedDragFeedback {
background-color: #A0A000;
}
CTabItem {
font: Terminus;
font-style: normal;
font-weight: normal;
}
CTabItem.busy {
font-style: italic;
}
CTabItem.highlighted {
font-weight: bold;
}

In ag-Grid when I change the row background, there is no color for selected row (blue by default)

In ag-Grid when I change the row background color, it is working fine, but when I select the row, the color doesn't change to the blue color so I can recognize that the row is selected.
I'm using gridOptions.getRowStyle to change the row background color:
gridOptions.getRowStyle = function(params) {
return { background: "#3a3a3a" }
}
The way I would approach it, would be to use the rowClass option in ag-grid.
rowClass: 'my-row'
And then in your css you can define:
.ag-root .my-row:not(.ag-row-selected) {
background-color: #3a3a3a;
}
https://embed.plnkr.co/fTENsl/
Another option, if you want a custom selected color, would be to use this:
.ag-root .my-row {
background-color: #3a3a3a;
}
.ag-root .my-row.ag-row-selected {
background-color: blue;
}
if you want to change style of selected row use class in css
.ag-row-selected {
background-color: black;
color: white ;
border-color: gray;
}

Custom SVG icon ionic 3 tabs, icon has background color

I make a custom SVG icon on ionic 3 tabs, evrthing works well in browser,
but when I tested it on a device or emulator the color become wrong on the background
How to fix this?
ion-icon {
&[class*="custom-"] {
mask-size: contain;
mask-position: 50% 50%;
mask-repeat: no-repeat;
background: currentColor;
width: 1em;
height: 1em;
}
&[class*="custom-donkey"] {
mask-image: url(../assets/icon/donkey.svg);
}
&[class*="custom-cat-ol"] {
mask-image: url(../assets/icon/cat-outline.svg);
}
}
Please help I thing from this code
background: currentColor;
&[class*="custom-donkey"] {
mask-image: url(../assets/icon/donkey.svg);
}
&[class*="custom-cat-ol"] {
mask-image: url(../assets/icon/cat-outline.svg);
}
instead of Adding The Url/Path of the SVG icon Try to add the SVG Code or You can Directly add the SVG code in bottom menu in HTML and Adjust the Size using CSS Class