upgrade ionic 3 to ionic 5 - ionic-framework

The old project that I'm trying to upgrade has a custom CSS for the native element
.searchbar-input {
padding: 6px 55px;
border-radius: 2px;
background-position: left 8px center;
height: auto;
font-size: 1.6rem;
font-weight: 400;
line-height: 3rem;
color: #141414;
background-color: #fff;
-webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}
although we can't do something similar with ionic 4/5 because most of the CSS encapsulated inside of the component. is there a possibility to make me edit the native element CSS or importing my old style to the new project?

Related

Oracle APEX 20.1: Theme Vita Dark CSS-Error on Textfield with autocomplete

When you apply the Vita Dark-theme to your app and have selection lists, such as in a textfield with autocomplete, the background and the text in the select list are white and thus hard to read.
Screenshot to show the wrong colors
Is there any workaround to this? All the other standard themes work correctly.
The issue can be addressed with a snippet of css which can be easily added in theme roller under custom css for Vita - Dark theme.
.oj-listbox-drop {
background-color: #222629;
color: #fefefe;
border-width: 0;
border-radius: 2px;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
padding: 8px 0
}
.oj-inputsearch-choice {
color: inherit;
background-color: transparent;
border-color: transparent
}
.oj-listbox-results .oj-hover {
--oj-listbox-bg-color-hover: #0076df;
background-color: #0076df;
color: #fff
}

Adding a dropdown or toggle button to DataGrid

Is there a way to add a dropdown button or toggle button to the CellTable or DataGrid?
The documentation only demonstrates using a regular button (ButtonCell).
To add a ToggleButton to a grid, the only way I found is to place the button in another panel (like a FlowPanel) then add this panel in the grid.
To found this type of button, you can visit the showcase of gwt :
http://samples.gwtproject.org/samples/Showcase/Showcase.html#!CwCustomButton
here my code to have your button in a FlowPanel :
RootLayoutPanel rp = RootLayoutPanel.get();
FlowPanel togglePanel = new FlowPanel();
ToggleButton toggle = new ToggleButton("Coucou");
toggle.setWidth("100px");
togglePanel.add(toggle);
rp.add(togglePanel);
css :
.gwt-ToggleButton-up,
.gwt-ToggleButton-up-hovering,
.gwt-ToggleButton-up-disabled,
.gwt-ToggleButton-down,
.gwt-ToggleButton-down-hovering,
.gwt-ToggleButton-down-disabled {
margin: 0;
text-decoration: none;
background: url("images/hborder.png") repeat-x 0px -27px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.gwt-ToggleButton-up,
.gwt-ToggleButton-up-hovering,
.gwt-ToggleButton-up-disabled {
padding: 3px 5px 3px 5px;
}
.gwt-ToggleButton-up {
border:1px solid #bbb;
border-bottom: 1px solid #a0a0a0;
cursor: pointer;
cursor: hand;
}
.gwt-ToggleButton-up-hovering {
border: 1px solid;
border-color: #939393;
cursor: pointer;
cursor: hand;
}
.gwt-ToggleButton-up-disabled {
border: 1px solid #bbb;
cursor: default;
opacity: .5;
zoom: 1;
filter: alpha(opacity=45);
}
.gwt-ToggleButton-down,
.gwt-ToggleButton-down-hovering,
.gwt-ToggleButton-down-disabled {
padding: 4px 4px 2px 6px;
}
.gwt-ToggleButton-down {
background-position: 0 -513px;
border: 1px inset #666;
cursor: pointer;
cursor: hand;
}
.gwt-ToggleButton-down-hovering {
background-position: 0 -513px;
border: 1px inset;
border-color: #9cf #69e #69e #7af;
cursor: pointer;
cursor: hand;
}
.gwt-ToggleButton-down-disabled {
background-position: 0 -513px;
border: 1px inset #ccc;
cursor: default;
opacity: .5;
zoom: 1;
filter: alpha(opacity=45);
}
It is the basic css i took on the showcase. You should modify it.

How to hide gwt-dialog box border completely?

How could I hide border of dialog box in GWT completely or we can say that hide the dialog box's caption portion completely. I tried to use .gwt-DialogBox .Caption {} in css
but I couldn't find any option which could hide the border fully.
Thanks in advance!
Don't use gwt-DialogBox name for css to change dialog box. it will not apply. try to apply different style name with same style like:
.gwt-DialogBoxNew
{
border: 8px solid #7F7F7F;
border-radius: 6px 6px 6px 6px;
box-shadow: none;
line-height: 7px;
opacity: 1;
z-index: 1000;
background-color : #FFFFFF;
}
.gwt-DialogBoxNew .Caption {
background: none repeat scroll 0 0 #E4E4E4;
border: medium none #D4D4D4;
cursor: default;
font-family: Arial Unicode MS, Arial, sans-serif !important;
font-size: 18px;
font-weight: 400;
line-height: 27px;
padding:2px 0px 0px 0px;
}
.gwt-DialogBoxNew .dialogContent {
}
.gwt-DialogBoxNew .dialogMiddleCenter {
padding: 3px;
background: white;
}
.gwt-DialogBoxNew .dialogBottomCenter {
}
.gwt-DialogBoxNew .dialogMiddleLeft {
/* background: url(images/vborder.png) repeat-y -31px 0px; */
}
.gwt-DialogBoxNew .dialogMiddleRight {
/* background: url(images/vborder.png) repeat-y -32px 0px;
}
.gwt-DialogBoxNew .dialogTopLeftInner {
width: 10px;
height: 8px;
zoom: 1;
background: none repeat scroll 0 0 #E4E4E4;
}
.gwt-DialogBoxNew .dialogTopRightInner {
width: 12px;
zoom: 1;
background: none repeat scroll 0 0 #E4E4E4;
}
.gwt-DialogBoxNew .dialogBottomLeftInner {
width: 10px;
height: 12px;
zoom: 1;
}
.gwt-DialogBoxNew .dialogBottomRightInner {
width: 12px;
height: 12px;
zoom: 1;
}
.gwt-DialogBoxNew .dialogTopLeft {
/* background: url(images/circles.png) no-repeat -20px 0px;
-background: url(images/circles_ie6.png) no-repeat -20px 0px; */
background: none repeat scroll 0 0 #E4E4E4;
}
.gwt-DialogBoxNew .dialogTopRight {
/* background: url(images/circles.png) no-repeat -28px 0px;
-background: url(images/circles_ie6.png) no-repeat -28px 0px; */
background: none repeat scroll 0 0 #E4E4E4;
}
.gwt-DialogBoxNew .dialogBottomLeft {
/* background: url(images/circles.png) no-repeat 0px -36px;
-background: url(images/circles_ie6.png) no-repeat 0px -36px; */
}
.gwt-DialogBoxNew .dialogBottomRight {
/* background: url(images/circles.png) no-repeat -8px -36px;
-background: url(images/circles_ie6.png) no-repeat -8px -36px; */
}
Remove border style from it as you concern here.
A DialogBox is basically a DecoratedPopupPanel with a caption. You want neither the decoration nor the caption, so how about using a PopupPanel instead? (AFAICT, the only difference will be how you size the panel)

How to run multiple css selector classes at once?

I'm new to web design and I'm working on a small project, but I'm faced with a problem and I would appreciate any help.
So I have three div containers and I'm using them to show thumbnails of photos inside an album and I've given each one of them a CSS :hover selector and I want all three classes to run at once when the mouse is over any one of the divs. I tried to simulate a mouseover event but it didn't work and I tried to setattribute with javascript didn't work either. Here is my css.
#frame {
border: solid 2px black;
background-image:url(cpHDFLI6_mini.jpg);
background-repeat:no-repeat;
position:absolute;
top:87px;
right:183px;
left:auto;
display: block;
width: 60px;
height: 70px;
-o-transform: rotate(30deg);
-webkit-transform: rotate(30deg);
-moz-transform: rotate(30deg);
transform: rotate(30deg);
}
#frame1 {
border: solid 2px black;
background-image:url(20397.jpg);
background-repeat:no-repeat;
position:absolute;
top:75px;
right:228px;
left:auto;
display: block;
width: 60px;
height: 70px;
z-index:1;
}
#frame2 {
border: solid 2px black;
background-image:url(candle.jpg);
background-repeat:no-repeat;
position:absolute;
top:87px;
right:273px;
left:auto;
display: block;
width: 60px;
height: 70px;
-o-transform: rotate(-30deg);
-webkit-transform: rotate(-30deg);
-moz-transform: rotate(-30deg);
transform: rotate(-30deg);
z-index:0;
}
#frame2:hover {
opacity: 1;
-webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom,
from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4)));
-webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8);
-moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8);
box-shadow: 0px 0px 20px rgba(255,255,255,0.8);
}
#frame1:hover {
opacity: 1;
-webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom,
from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4)));
-webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8);
-moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8);
box-shadow: 0px 0px 20px rgba(255,255,255,0.8);
}
#frame:hover {
opacity: 1;
-webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom,
from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4)));
-webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8);
-moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8);
box-shadow: 0px 0px 20px rgba(255,255,255,0.8);
}
If you don't understand what I want I can explain more.
NO Way to do it on CSS only. And Hover is not apply for DIV. Its for A, UL > LI...
You must know about Javascript or jQuery.
Mouse hover on 1 div then $.AddClass ( Active Class ) for ALL DIVS, and When Mouse Out of Div, $.RemoveClass for ALL DIVS.
If you don't know about jQuery or Javascript, you can ask here, we can help.
You can copy and paste it for DIv2 and Div3 about mouse move out and over too. If you understand on DOM, you can try $("div[name=3DIV]"). for shorter code , however I am not sure u understand the script or not, so I posted simple script but long code.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" /></script>
<script language="javascript">
$(document).ready(function() {
$("#divID1").mouseover(function() {
$("#divID1").addClass("ACTIVE_CLASS");
$("#divID2").addClass("ACTIVE_CLASS");
$("#divID3").addClass("ACTIVE_CLASS");
});
$("#divID1").mouseout()(function() {
$("#divID1").removeClass("ACTIVE_CLASS");
$("#divID2").removeClass("ACTIVE_CLASS");
$("#divID3").removeClass("ACTIVE_CLASS");
});
});
</script>

EditorFor Template for boolean type

How can we access the model's property name when using EditorFor() with a template for value types, for instance like the one below for bool type?
It seems that the MVC somehow pulls out the property name because it correctly renders the checkbox (or textbox, if used) with the correct property name, but where does MVC get it?
<%# Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<bool>" %>
<fieldset>
<legend>insert boolean property name here or the value of DisplayName attribute??</legend>
<div class="clear">
<p>
<%: Html.CheckBox("", Model) %>
<span>insert boolean property name here or the value of DisplayName attribute??</span>
</p>
</div>
</fieldset>
Example of a Boolean type for EditorTemplates using MVC3, Jquery 1.7 and CSS3
EditorTemplates Boolean.cshtml
#model bool
#{
string propertyName = Html.ViewData.ModelMetadata.PropertyName;
}
<div class="field switch">
#if (#Model == true)
{
<label class="cb-enable selected">
<span>Yes</span></label>
<label class="cb-disable">
<span>No</span></label>
<input type="checkbox" id="#propertyName" class="checkbox" name="#propertyName" value="true" checked=checked />
}
else
{
<label class="cb-enable">
<span>Yes</span></label>
<label class="cb-disable selected">
<span>No</span></label>
<input type="checkbox" id="#propertyName" class="checkbox" name="#propertyName" value="false" />
}
</div>
<script>
$(document).ready(function () {
$(".cb-enable").click(function () {
var parent = $(this).parents('.switch');
$('.cb-disable', parent).removeClass('selected');
$(this).addClass('selected');
$('.checkbox', parent).attr('checked', true);
$('.checkbox', parent).attr('value', true);
});
$(".cb-disable").click(function () {
var parent = $(this).parents('.switch');
$('.cb-enable', parent).removeClass('selected');
$(this).addClass('selected');
$('.checkbox', parent).attr('checked', false);
$('.checkbox', parent).attr('value', false);
});
});
</script>
CSS
.cb-enable, .cb-disable, .cb-enable span, .cb-disable span
{
display: block; float: left;
}
.cb-enable {
display: block;
float: left;
border: 1px solid #EEE;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 0px;
-webkit-border-bottom-right-radius: 0;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 0px;
-moz-border-radius-bottomright: 0;
-moz-border-radius-bottomleft: 5px;
border-top-left-radius: 5px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 5px;
}
.cb-disable
{
display: block; float: left; border: 1px solid #EEE;
.roundedCorners(0px,5px,0px,5px);
}
.cb-enable span, .cb-disable span
{
line-height: 30px; display: block; background-repeat: no-repeat;
}
.cb-enable span { padding: 0 10px; }
.cb-disable span { padding: 0 10px; }
.cb-disable.selected
{
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, transparent), color-stop(100%, rgba(0, 0, 0, 0.25))),#D5D5D5;
background: -webkit-linear-gradient(top, transparent,rgba(0, 0, 0, 0.25)),#D5D5D5;
background: -moz-linear-gradient(top, transparent,rgba(0, 0, 0, 0.25)),#D5D5D5;
background: -o-linear-gradient(top, transparent,rgba(0, 0, 0, 0.25)),#D5D5D5;
background: -ms-linear-gradient(top, transparent,rgba(0, 0, 0, 0.25)),#D5D5D5;
background: linear-gradient(top, transparent,rgba(0, 0, 0, 0.25)),#D5D5D5;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 0px;
-webkit-border-bottom-right-radius: 0;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 0px;
-moz-border-radius-bottomright: 0;
-moz-border-radius-bottomleft: 5px;
-moz-box-shadow: 0 1px 2px rgba(0,0,0,0.4);
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.4);
-o-box-shadow: 0 1px 2px rgba(0,0,0,0.4);
box-shadow: 0 1px 2px rgba(0,0,0,0.4);
text-shadow: rgba(0, 0, 0, 0.2) 0 -1px 1px;
color: white;
}
.cb-disable.selected span { color: #fff; }
.cb-enable.selected
{
background: #129EE8;
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, transparent), color-stop(100%, rgba(0, 0, 0, 0.25))),#129EE8;
background: -webkit-linear-gradient(top, transparent,rgba(0, 0, 0, 0.25)),#129EE8;
background: -moz-linear-gradient(top, transparent,rgba(0, 0, 0, 0.25)),#129EE8;
background: -o-linear-gradient(top, transparent,rgba(0, 0, 0, 0.25)),#129EE8;
background: -ms-linear-gradient(top, transparent,rgba(0, 0, 0, 0.25)),#129EE8;
background: linear-gradient(top, transparent,rgba(0, 0, 0, 0.25)),#129EE8;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-top-right-radius: 0px;
-webkit-border-bottom-right-radius: 0;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-topright: 0px;
-moz-border-radius-bottomright: 0;
-moz-border-radius-bottomleft: 5px;
-moz-box-shadow: 0 1px 2px rgba(0,0,0,0.4);
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.4);
-o-box-shadow: 0 1px 2px rgba(0,0,0,0.4);
box-shadow: 0 1px 2px rgba(0,0,0,0.4);
text-shadow: rgba(0, 0, 0, 0.2) 0 -1px 1px;
}
.cb-enable.selected span { color: #fff; }
.switch label { cursor: pointer; }
.switch input { display: none; }
<%: ViewData.ModelMetadata.PropertyName %>
or:
<%: ViewData.ModelMetadata.DisplayName %>
UPDATE:
Example of resource localized display attribute:
public class LocalizedDisplayNameAttribute : DisplayNameAttribute
{
public LocalizedDisplayNameAttribute(string name)
: base(GetValueFromResource(name))
{ }
private static string GetValueFromResource(string name)
{
// TODO: fetch the display name from wherever you want
throw new NotImplementedException();
}
}