Listview remove item border and checkmark - css

I'm sorry if answer on this question is to easy, but I was realy trying to find answer on the internet, but without any success.
I wish to remove all kind of borders and checkmark's from my listview. How can I do this?
I already tryed to set border and outline on none or transparent or something, but there is still some kind of gray border. I have no idea how can I remove this one or how to remove checkmark?
My current result is this(when item has .win-selected class):
Html code:
<div class="filterPanel left">
<h2 class="title">Status filter</h2>
<div id="labRole_name" class="filter-view win-selectionstylefilled" data-win-control="WinJS.UI.ListView" data-win-options="{ selectionMode: 'single', tapBehavior: 'directSelect', layout: { type: WinJS.UI.ListLayout } }"></div>
</div>
And css code:
.filter-view {
width: 250px;
margin-left: -7px;
color: gray;
}
.filter-view .item {
background-color: #F2F2F2;
outline: #F2F2F2 solid 10px;
}
.filter-view .item *{
display: inline-block;
}
.filter-view .win-selected .item:hover .count,
.filter-view .item:hover .count {
color: #4BB3DD !important;
}
.filter-view .win-selected .item:hover .filter,
.filter-view .item:hover .filter {
color: #8B8B8B !important;
}
.filter-view .win-selected .item .filter,
.filter-view .item .filter {
color: #333333 !important;
}
.filter-view .win-selected .item .count,
.filter-view .item .count {
color: #0096D1 !important;
}
.filter-view .item .filter {
margin-right: 10px;
width: 160px;
height: 20px;
white-space: nowrap;
overflow: hidden;
}
.filter-view .item .count{
min-width: 30px;
text-align: right;
font-weight: 400;
}

You need to remove this outline:
.filter-view .item {
background-color: #F2F2F2;
outline: #F2F2F2 solid 10px;
}
Should be
.filter-view .item {
background-color: #F2F2F2;
outline: 0;
}
And if is possible post a link of your page online.

To make items not selectable, selectionMode for the listview needs to be set. you may also want swipeBehavior and tapBehavior to be none.
<div id="listView" data-win-control="WinJS.UI.ListView"
data-win-options="{
selectionMode: 'none', swipeBehavior: 'none',
tapBehavior: 'none' }">
</div>
Regards the mouse hover highlight - styling listview topic might help.

To change the border appearance of ListView's item hover and active state, you'll have to override .win-itembox's value with ::before selector.
.win-listview .win-itembox:hover::before {
border-color: transparent; /* get rid of border, both of :hover and .win-pressed (same as :active) */
}
The default values can be found at ui-light.css or ui-dark.css, where the opacity and the color value of border is located.
/* the default value of WinJS ListView's item hover and active color from ui-light.css */
html.win-hoverable .win-listview .win-itembox:hover::before,
html.win-hoverable .win-itemcontainer .win-itembox:hover::before {
opacity: 0.4;
}
html.win-hoverable .win-listview .win-pressed .win-itembox:hover::before,
html.win-hoverable .win-listview .win-pressed.win-itembox:hover::before,
html.win-hoverable .win-itemcontainer.win-pressed .win-itembox:hover::before {
opacity: 0.6;
}
...
html.win-hoverable .win-listview .win-itembox:hover::before,
html.win-hoverable .win-itemcontainer .win-itembox:hover::before {
border-color: #000000;
}

Related

How do I make the -ms-thumb pseudo element register pointer events on underlying range input in two input overlay in IE?

I want to make a range input with two handles. I have made one overlaying two inputs with type range. I use the css property pointer events to disable the track from intercepting any click meant to hit the underlying thumb. This works fine in Chrome and in Firefox. Is does not seems to pickup any pointer events in IE 11 or Edge. How do I get the -ms-thumb pseudo element to pick up the pointer events?
I have prepared a code pen to illustrate the problem. https://codepen.io/RemkoBoschker/pen/jzLgXq
The same code is included below
#mixin thumb($input-height, $input-border-radius, $input-thumb-color) {
width: $input-height;
height: $input-height;
border: none;
pointer-events: auto;
border-radius: $input-border-radius;
background-color: $input-thumb-color;
cursor: pointer;
position: relative;
z-index: 1;
}
/* https://codepen.io/rendykstan/pen/VLqZGO8 */
#mixin range-slider(
$width,
$height,
$input-top,
$input-bg-color,
$input-thumb-color,
$float: none,
$input-height: 20px,
$input-border-radius: 14px,
$bubble-width: 100px
) {
position: relative;
width: $width;
margin-left: (100% - $width) / 2;
height: $height;
float: $float;
text-align: center;
input[type='range'] {
-webkit-appearance: none;
pointer-events: none;
height: $input-height;
padding: 0;
position: absolute;
left: 0;
top: $input-top;
height: $input-height;
width: 100%;
border-radius: $input-border-radius;
border: 1px solid grey;
background: none;
&:focus,
&:active {
outline: none;
}
&::-webkit-slider-thumb {
-webkit-appearance: none;
box-sizing: content-box;
#include thumb($input-height, $input-border-radius, $input-thumb-color);
}
&::-moz-range-thumb {
#include thumb($input-height, $input-border-radius, $input-thumb-color);
}
&::-ms-thumb {
#include thumb($input-height, $input-border-radius, $input-thumb-color);
}
&::-webkit-slider-runnable-track {
/* your track styles */
}
&::-moz-range-track {
-moz-appearance: none;
background: none;
}
&::-ms-track {
/* should come after -webkit- */
border-color: transparent;
color: transparent;
background: transparent;
/* again your track styles */
}
&::-ms-fill-upper {
background: transparent;
}
&::-ms-fill-lower {
background: transparent;
}
&::-ms-tooltip {
display: none;
}
}
}
.range-slider {
#include range-slider(80%, 54px, 30px, #f1efef, green, left, 20px, 14px, 80px);
}
<div class="range-slider">
<input type="range" step="1" min="0" max="10" value=5>
<input type="range" step="1" min="0" max="10" value="3">
</div>
I have also written a cross-browser version using js.
https://codepen.io/RemkoBoschker/pen/bvaQBw
I also posted a bug report with Microsoft
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/16592591/

Multiple <progress> elements on a page with different colors

I'm using the element and I've found good instructions on [styling] (http://html5doctor.com/the-progress-element/).
I'd like to have more than one progress bar on a page and I'd like them to have different fill/value colors. Is this possible? Can I do this by tweaking my CSS? Or an I better off rolling my own? Thanks!
.current-roll {
-webkit-appearance: none;
width: 80%;
height: 25px;
/* next line does nothing */
color: #f7a700
}
.previous-roll {
-webkit-appearance: none;
width: 80%;
height: 25px;
/* next line does nothing */
color: #98c11e
}
progress::-webkit-progress-bar {
background: #d8d8d8;
}
progress::-webkit-progress-value {
background: #f7a700;
}
<p>Orange bar</p>
<progress class="current-roll" value="0.5"></progress>
<p>Green bar</p>
<progress class="previous-roll" value="0.75"></progress>
progress::-webkit-progress-value is what changes the progress bar color.
Example
progress.current-roll::-webkit-progress-value {
background: #f7a700;
}
You already have what you look for in the example you have given!
use progress.current-rollto style the colors specifically for .current-roll for instance
example below:
.current-roll {
-webkit-appearance: none;
width: 80%;
height: 25px;
/* next line does nothing */
color: #f7a700
}
.previous-roll {
-webkit-appearance: none;
width: 80%;
height: 25px;
/* next line does nothing */
color: #98c11e
}
progress.previous-roll::-webkit-progress-bar {
background: #d8d8d8;
}
progress.previous-roll::-webkit-progress-value {
background: #f7a700;
}
progress.current-roll::-webkit-progress-bar {
background: #ddd;
}
progress.current-roll::-webkit-progress-value {
background: red;
}
<p>Red bar</p>
<progress class="current-roll" value="0.5"></progress>
<p>Orange bar</p>
<progress class="previous-roll" value="0.75"></progress>

Rating system using CSS (hover from left to right)

Is there a simple way to reverse the colour order when hovering?
Using this trick here I have the order right > left:
&:hover,
&:hover ~ button {
color: red
}
The fiddle with the right > left: https://jsfiddle.net/celio/Lowc1ruh/
Example with the left > right: https://css-tricks.com/examples/StarRating/
It is impossible for me to use float, position: absolute; and anything that changes the right order of my current html.
Plain CSS example:
button {
margin: 0;
padding: 5px;
border: none;
background: transparent;
display: inline-block;
}
button:before {
content: "⋆";
font-size: 5rem;
line-height: 1;
}
button:hover,
button:hover ~ button {
color: red;
}
<div class="wrapper">
<button></button>
<button id="2"></button>
<button></button>
<button></button>
<button></button>
</div>
One way would be to make all the child button elements color: red; when hovering over .wrapper. Then use the sibling selector (~) to change any elements after the currently hovered element to color: black;.
You should remove any whitespace between the elements (in this case I put them into one line in the HTML) to ensure that the cursor is always hovering over a star.
Example with plain CSS:
.wrapper button {
margin: 0;
padding: 5px;
border: none;
background: transparent;
display: inline-block;
}
.wrapper button:before {
content: "⋆";
font-size: 5rem;
line-height: 1;
}
.wrapper button:hover ~ button {
color: black;
}
.wrapper:hover button {
color: red;
}
<div class="wrapper">
<button></button><button id="2"></button><button></button><button></button><button></button>
</div>
JS Fiddle using SASS

how to hide outer border of rich:fileupload

I want to hide border of rich:fileupload.I just need to show only browse button.Can anyone please guide me on this.
<td colspan="4">
<rich:fileUpload id="upload" fileUploadListener="#{fileUploadBean.listener}" maxFilesQuantity="#{fileUploadBean.uploadsAvailable}"
acceptedTypes="txt,ppt,jpg,doc,xls, gif, bmp,pdf" ontyperejected="alert('Only TXT,PPT,DOC,XLS JPG, GIF,PDF and BMP files are accepted');"
addControlLabel="Browse" listHeight="auto" listWidth="300px" onsizerejected="fileSizeRejected();"
immediateUpload="#{fileUploadBean.autoUpload}" allowFlash="#{fileUploadBean.useFlash}" addButtonClass="browse-button-font" >
<a4j:support event="onuploadcomplete" reRender="uploadInfo" oncomplete="setFlag();"/>
</rich:fileUpload>
</td>
Below is my CSS code:
Even I put border:none still one border is coming outside the browse button.
.rich-fileupload-button-border{
border:none !important;
}
.rich-fileupload-ico-start,.rich-fileupload-ico-stop,.rich-fileupload-ico-clear,.rich-fileupload-anc{
display: none !important;
}
.rich-fileupload-ico-add{
border: 1px solid #474747; background: #0035a9 url(images/ui-bg_highlight-hard_60_0035a9_1x100.png) 50% 50% repeat-x;
position: fixed;
margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible;
background-image: none;
}
.browse-button-font
{
font-family: Segoe UI, Arial, sans-serif; font-size: 1.0em;font-weight: bold;
color: #ffffff;
}
.rich-fileupload-toolbar-decor {
background: none;
border:none !important;
}
.rich-fileupload-list-decor{
border:none !important;
}
div div.rf-fu { border: 0px; width: 85px; !important }
div div.rf-fu-hdr { border: 0px; !important }
span span.rf-fu-btn-clr { border: 0px; !important }
span.rf-fu-btns-lft{ width: 85px; !important }
span.rf-fu-btns-rgh{ display: none; !important }
div div.rf-fu-lst { display:none; !important }
Try the CSS above, this should do the trick.

Simple_form color styling

Is it possible to change the default color of the simple_form input box from grey to another color with CSS?
Here is my CSS:
.simple_form div.input {
width: 500px;
display: block;
margin-bottom: 0px;
}
Yes, use color:
.simple_form div.input {
color: #ff0000; /* red */
}
To change border:
.simple_form div.input:focus {
border: 1px solid #ff0000; /* red */
}

Resources