How to style options in Appmaker MultiSelect Widget - css

I'm trying to use CSS to stylize the options within the MultiSelect widget, for example to make a border around each of the individual options.
Is there any way to do this through Appmaker? Thank you

app-MultiSelect-Item is what you are looking for to customize the options.
For example:
.app-MultiSelect-Item {
font-size: 12px;
line-height: 12px;
padding-bottom: 8px;
padding-top: 8px;
border: 1px black solid ;
border-top-right-radius: 20px;
border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
background-color: #FF9800;
}

The CSS is different for checked/unchecked options
The following example has rounded borders on the sides. Red for unselected and green for selected (with a green background)
.app-MultiSelect-Input {
font-size: 11px;
font-family: Verdana;
}
.app-MultiSelect-Item {
border-radius: 10px;
border-right: 2px red solid;
border-left: 2px red solid;
line-height: 8px;
margin-top: 3px;
}
.app-MultiSelect-Item.selected {
border-radius: 10px;
border-right: 2px green solid;
border-left: 2px green solid;
background-color: lightgreen;
line-height: 8px;
margin-top: 3px;
}
source: [https://developers-dot-devsite-v2-prod.appspot.com/appmaker/scripting/api/widgets#MultiSelect][1]

Related

QDockWidget - fonts getting caught off (decender part)

On QdockWidgets part of the text is being caught off, the "tail" part or decender in typography terminology. So for example Chapters and Settings, the "p" and the "g" are cut
/******** QDockWidget - this controls the top header for widgets ********/
QDockWidget {
titlebar-close-icon: url(:/Controls/ic_close2.png);
titlebar-normal-icon: url(:/Controls/ic_undock.png);
color: white;
font-size: 12pt;
}
QDockWidget::title {
text-align: left; /* align the text to the left */
background: #2e333b;
padding-left: 27px;
padding-top: 15px;
padding-bottom: 15px;
border-bottom: 1px solid black;
}
QDockWidget::close-button, QDockWidget::float-button {
border: 1px solid transparent;
border-radius: 2px;
background: transparent;
}
QDockWidget::close-button:hover, QDockWidget::float-button:hover {
border: 1px solid grey;
}
QDockWidget::close-button:pressed, QDockWidget::float-button:pressed {
padding: 1px -1px -1px 1px;
}
/*_______QDockWidget_______*/
The problem in border and padding here:
QDockWidget::title {
<...>
padding-bottom: 15px;
border-bottom: 1px solid black;
}
For example, you can reduce padding or remove border.

css triangle being cut-out by parent container and shaking

I am trying to do some up and down arrows, which depend on stock price changes (https://jsfiddle.net/ec0x7pru/6/), they seem to be cut out due to the parent container css definition, what would be modified CSS for the triangle-up and triangle-down classes to prevent that.
.triangle-up {
display: inline-block;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 8px solid green;
bottom: 1em;
}
.triangle-down {
display: inline-block;
bottom: 1em;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 8px solid red;
}
On another note, using FF developer edition, these seem to be shaking slightly? any suggestion to fix that.
Remove padding-right:
https://jsfiddle.net/ec0x7pru/7/
And try to use this:
border-style: inset
This is a CSS-only alternative to my other answer:
.container span {
padding-right: 0.3125rem;
font-family: "NHaasGroteskDSPro-75Bd", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 1.125rem;
}
.triangle-up {
display: inline-block;
border-style: solid;
border-width: 0 7px 14px 7px;
border-color: transparent transparent green transparent;
bottom: 1em;
padding-right:0px !important;
}
.triangle-down {
display: inline-block;
bottom: 1em;
border-style: solid;
border-width: 14px 7px 0 7px;
border-color: red transparent transparent transparent;
padding-right: 0px !important;
}
Due to that padding, there was a plateau on the top. I've tweaked borders and overridden that.
https://jsfiddle.net/ec0x7pru/19/
Use a character instead:
<div class="container">
<span>DAX</span>
<span>3000</span>
<span id="up">▲</span><span>50.6</span>
<span>CAC 40</span>
<span>4536</span>
<span id="down">▼</span><span>-23.2</span>
</div>
https://jsfiddle.net/ec0x7pru/13/

QPushButton dimensions change when Stylesheet is apllied

When I apply a style sheet on QPushButton its dimensions change.
This is my style sheet declaration.
QPushButton {
background-color: rgb(175, 187, 199);
color: black;
border-width: 1px;
border-top: 1px solid white;
border-left: 1px solid white;
border-right: 1px solid grey;
border-bottom: 1px solid grey;
border-style: solid;
border-radius: 5;
padding: 3px;
padding-left: 5px;
padding-right: 5px;
font: 16px;
font-weight: bold;
}
Image - Before applying style sheet
Image - After applying style sheet
How to keep the original button size?
Based on comment below question: Try add qualifier:
MyDialog QPushButton {
background-color: rgb(175, 187, 199);
color: black;
border-width: 1px;
border-top: 1px solid white;
border-left: 1px solid white;
border-right: 1px solid grey;
border-bottom: 1px solid grey;
border-style: solid;
border-radius: 5;
padding: 3px;
padding-left: 5px;
padding-right: 5px;
font: 16px;
font-weight: bold;
}
This should be merged with default style sheet (not override the whole thing) and work only on buttons you need to alter.
See documentation.

CSS div border changes to black when visited

I have a menu where each link is a div box. This div box have a gray border-bottom, however, when the link is visited it turns black. I just can't figure why.
On the following image I've clicked the Rediger profil and Log af links.
JSFiddle: http://jsfiddle.net/LpGbT/
HTML
<div id="design_sidebar">
<div id="design_sidebar_head">
Patrick Reck
</div>
<div class="design_sidebar_menu_item">Besøgende</div>
<div class="design_sidebar_menu_item">Mine favoritter</div>
<div class="design_sidebar_menu_item">Rediger profil</div>
<div class="design_sidebar_menu_item">Log af</div>
</div>
CSS
a {
text-decoration: none;
}
#design_sidebar {
width: 200px;
float: left;
border: 1px solid #d6d6d6;
-moz-border-radius: 2px;
border-radius: 2px;
background-color: white;
}
#design_sidebar_head {
width: 165px;
height: 30px;
font-family: Segoe;
font-size: 14px;
font-weight: bold;
color: #333333;
padding-top: 10px;
padding-left: 35px;
border-bottom: 1px solid #d6d6d6;
background-image: url('../img/icons/user.png');
background-repeat: no-repeat;
background-position: 10px 11px;
background-color: #f7f7f7;
}
.design_sidebar_menu_item {
padding: 5px;
padding-left: 10px;
font-size: 14px;
color: #333333;
border-bottom: 1px solid #d6d6d6;
}
.design_sidebar_menu_item:hover {
color: white;
background-color: #a6242f;
}
You may define a copied version of your div selector with a :visited suffix in order to set new colours for visited objects.
Aldo div classes are prefixed with a dot (.) instead of a sharp (#) character. Just a reminder. :)
.design_sidebar_menu_item:visited {
border-color: <your_color>;
}
If it doesn't harm your design etc. I would suggest this:
HTML:
<div id="design_sidebar">
<div id="design_sidebar_head">
Patrick Reck
</div>
Patrick Reck
Besøgende
Mine favoritter
Rediger profil
Log af
</div>
CSS:
div#design_sidebar a {
text-decoration: none;
padding: 5px;
padding-left: 10px;
font-size: 14px;
color: #333333;
border-bottom: 1px solid #d6d6d6;
display: block;
}
div#design_sidebar a:hover {
color: white;
background-color: #a6242f;
}
#design_sidebar {
width: 200px;
float: left;
border: 1px solid #d6d6d6;
-moz-border-radius: 2px;
border-radius: 2px;
background-color: white;
}
#design_sidebar_head {
width: 165px;
height: 30px;
font-family: Segoe;
font-size: 14px;
font-weight: bold;
color: #333333;
padding-top: 10px;
padding-left: 35px;
border-bottom: 1px solid #d6d6d6;
background-image: url('../img/icons/user.png');
background-repeat: no-repeat;
background-position: 10px 11px;
background-color: #f7f7f7;
}
EDIT:
How about adding:
a {
text-decoration: none;
display: block;
border-bottom: 1px solid #d6d6d6;
}
And removing border-bottom: 1px solid #d6d6d6; from .design_sidebar_menu_item {...}
The others will need links around them for this to work.
It doesn't..
I changed border-bottom color to 'green'. Now you have a clear view.
Check jsFiddle : check it out
.design_sidebar_menu_item {
padding: 5px;
padding-left: 10px;
font-size: 14px;
color: #333333;
border-bottom: 1px solid #00FF00;
}

Is there a way with Javascript to determine where a line break is placed in HTML?

I have this html:
<div id="tagsCloud" class="feedBarSegment">
<div id="tagsCloudHeader" class="segmentHeader">Tags</div><span class="tag">Psalm 33</span><span class="tag">Edgar Allen Poe</span><span class="tag">John</span><span class="tag">Hello</span><span class="tag">Test</span></div>
With this CSS:
.segmentHeader {
font-size: 1.15em;
font-weight: bold;
border-bottom: #7792ad solid 1px;
margin-bottom: 5px;
}
.feedBarSegment {
width: 250px;
margin: 52px 20px 20px 25px;
}
#tagsCloud {
margin-top: 10px;
}
.tag {
display: inline-block;
background: #e9e3c4;
padding: 2px 4px;
border-top: 1px black solid;
border-right: 1px black solid;
}
.subject {
display: inline-block;
background: #f2b2a8;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
padding: 2px 3px 2px 3px;
border: black solid 1px;
margin: 2px;
}
I want to make it so that on each line, if no more tags fit that the tags on that line have padding added to them so that they completely span the entire line instead of having the extra space at the end. Is this possible to do?
If you can move from inline-block to inline for .tags you can use text-align: justify; on the container.
I believe what you're looking for is:
#tagsCloud {
text-align:justify;
}
http://www.w3schools.com/cssref/pr_text_text-align.asp
It seems like what you want is text-align: justify.

Resources