Exemplo n.º 1
0
 it('limits alpha when above 1', function () {
   expect(subject.transparentize(-1).toString()).to.equal('hsla(120, 50%, 60%, 1)');
 });
Exemplo n.º 2
0
 it('make hsla more transparent', function () {
   expect(subject.transparentize(0.2).toString()).to.equal('hsla(120, 50%, 60%, 0.8)');
 });
Exemplo n.º 3
0
 it('limits alpha when below 0', function () {
   expect(subject.transparentize(1.1).toString()).to.equal('hsla(120, 50%, 60%, 0)');
 });
Exemplo n.º 4
0
 it('limits lightness when below 0', function () {
   expect(subject.darken(70).toString()).to.equal('hsla(120, 50%, 0%, 1)');
 });
Exemplo n.º 5
0
 it('limits lightness when above 100', function () {
   expect(subject.darken(-50).toString()).to.equal('hsla(120, 50%, 100%, 1)');
 });
Exemplo n.º 6
0
 it('lightens colour', function () {
   expect(subject.lighten(5).toString()).to.equal('hsla(120, 50%, 65%, 1)');
 });
Exemplo n.º 7
0
 it('darkens colour', function () {
   expect(subject.darken(5).toString()).to.equal('hsla(120, 50%, 55%, 1)');
 });
Exemplo n.º 8
0
 it('limits saturation when below zero', function () {
   expect(subject.saturate(-60).toString()).to.equal('hsla(120, 0%, 60%, 1)');
 });
Exemplo n.º 9
0
 it('limits saturation when above 100', function () {
   expect(subject.saturate(60).toString()).to.equal('hsla(120, 100%, 60%, 1)');
 });
Exemplo n.º 10
0
 it('saturates colour', function () {
   expect(subject.saturate(5).toString()).to.equal('hsla(120, 55%, 60%, 1)');
 });
Exemplo n.º 11
0
 it('shifts hue', function () {
   expect(subject.shift(5).toString()).to.equal('hsla(125, 50%, 60%, 1)');
 });
Exemplo n.º 12
0
 it('converts to a valid hsla string', function () {
   expect(subject.toString()).to.equal('hsla(120, 50%, 60%, 1)');
 });
Exemplo n.º 13
0
 it('converts colour names to correct hue', function () {
   subject = hsla('cyan', 50, 60, 1);
   expect(subject.toString()).to.equal('hsla(180, 50%, 60%, 1)');
 });
Exemplo n.º 14
0
 it('moves', function () {
   expect(subject.direction_x).to.equal(0);
 });