Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old Browser-Support #151

Open
riede opened this issue Jan 16, 2020 · 1 comment
Open

Old Browser-Support #151

riede opened this issue Jan 16, 2020 · 1 comment
Assignees

Comments

@riede
Copy link

riede commented Jan 16, 2020

With v2 you use Custom Properties (CSS Variables) to set the size and the color. Using Custom Properties does not work with old browsers (e.g. IE11). Please support old Browser by defining a default value - something like this:

/* Config */
:root {
  --sk-size: 40px;
  --sk-color: #333;
}

/*  Plane */
.sk-plane {
  width: 40px;
  height: 40px;
  background-color: #333;
  width: var(--sk-size);
  height: var(--sk-size);
  background-color: var(--sk-color);
  animation: sk-plane 1.2s infinite ease-in-out; 
}

The IE11 will ignore the lines where the the Custom Field is set and uses the predefined values. Using var(value, default-value); does not work.

An easy way to prevent repetitions is using SCSS and the SCSS variables (see: #150):

$sk-size: 40px !default;
$sk-color: #333 !default;

/* Config */
:root {
  --sk-size: $sk-size;
  --sk-color: $sk-color;
}

/*  Plane */
.sk-plane {
  width:$sk-size;
  height: $sk-size;
  background-color: $sk-color;
  width: var(--sk-size);
  height: var(--sk-size);
  background-color: var(--sk-color);
  animation: sk-plane 1.2s infinite ease-in-out; 
}
@tobiasahlin tobiasahlin self-assigned this Jan 16, 2020
@tobiasahlin
Copy link
Owner

👍 I'll get on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants