Alternate Color Dot Over the Letter I

Alternate color dot over the letter i

Another solution http://jsbin.com/urOtixog/1/edit

This font-size can be changed.

@Fiskolin It is possible ... and quite easy.

<p>th<span class="i">i</span>s</p>

CSS

p {
font-size: 165px;
}
.i {
color: red;
position: relative;
}
.i:before {
content: "ı";
position: absolute;
color: black;
}

How to color Arabic letter in HTML page?

It's not possible without any workarounds but you can separate the different parts of the character with the help of some unicode character maps and make them as like modules of the main character and assemble them with the help of pseudo selectors. then you're gonna be able to color them individually.

h1 {
color:red;
position: relative;
}

h1::before {
content: "ܸ";
color:green;
position: absolute;
left: 0.45ch;
bottom: 1ch;
}

h1::after {
content: "ُ";
color:blue;
position: absolute;
left:0.1ch;
bottom: -0.2ch;
}
<h1>ٮ</h1>

DotVVM - What are the possibilities for coloring rows in GridView?

The BootstrapColor enum should be treated as a presentation layer thing. You are right that it's not wise to use it in internal microservices or in lower layers of the application.

The DTO that comes from the lower layer should contain the information about what's going on, without caring about how it will be displayed to the user. I would expect an enum with values like Paid, Unpaid, Canceled etc., or alternatively set of bool flags - IsPaid, IsCanceled and so on.

In the presentation layer, you have two options:

  1. Project the DTO to another DTO (either manually, or using AutoMapper for example) which will contain the BootstrapColor enum value.

  2. Use expressions in DotVVM data-bindings to make the transform in the markup.

For simple cases, I would choose the second option.

The correct syntax for <bs:ColorDecorator> is this:

<RowDecorators>
<bs:ColorDecorator Color="{value: State == OrderState.Confirmed ? BootstrapColor.Success : BootstrapColor.Danger }" />
</RowDecorators>

You need to add appropriate @import directives so the enums will resolve correctly.

If there are more than two options, or some states can co-exist together, you may consider using CSS classes:

<RowDecorators>
<dot:Decorator class-active="{value: IsActive}" class-paid="{value: IsPaid}" />
</RowDecorators>

This will add the active and paid CSS classes on the rows based on the value of IsActive and IsPaid properties (they must be bool).

d3 javascript alternate colors on click

Make yourself a toggle function and pass it into the click: http://jsfiddle.net/maniator/Bvmgm/6/

var toggleColor = (function(){
var currentColor = "white";

return function(){
currentColor = currentColor == "white" ? "magenta" : "white";
d3.select(this).style("fill", currentColor);
}
})();


Related Topics



Leave a reply



Submit