mirror of
https://github.com/wassname/talk.git
synced 2026-07-23 13:10:20 +08:00
[Docs] Notes about IE11 compatibility (#2810)
* docs: ie11 * fix: wordings
This commit is contained in:
@@ -6,11 +6,13 @@ permalink: /v5/integrating/counts/
|
||||
Add the `count.js` script to your `html` tree. On a page that includes the _Stream Embed_ this is done for you automatically, however for best performance we recommend to include it into the `<head>` tag.
|
||||
|
||||
```html
|
||||
<script src="//{{ CORAL_DOMAIN_NAME }}/assets/js/count.js" defer></script>
|
||||
<script class="coral-script" src="//{{ CORAL_DOMAIN_NAME }}/assets/js/count.js" defer></script>
|
||||
```
|
||||
|
||||
> **NOTE:** Replace the value of `{% raw %}{{ CORAL_DOMAIN_NAME }}{% endraw %}` with the location of your running instance of Coral.
|
||||
|
||||
> **NOTE:** `class="coral-script"` is needed to support IE11.
|
||||
|
||||
Insert an html element with the class `coral-count` and configure it using `data-coral-*` attributes.
|
||||
|
||||
```html
|
||||
|
||||
@@ -119,4 +119,27 @@ Strings MUST NOT be changed after they've been committed and pushed to master. C
|
||||
|
||||
If you are a developer contributing a new language, you’ll need to add the required i18n support in the i18n files (or you can leave that to us if you like). If you’re a non-developer, you can submit the translation via GitHub if you feel comfortable doing that, or feel free to email it to us via our Support: support@coralproject.net
|
||||
|
||||
If you want to suggest a new language or put a placeholder for a translation you’re working on, feel free to create a GitHub issue: https://github.com/coralproject/talk/issues/new
|
||||
If you want to suggest a new language or put a placeholder for a translation you’re working on, feel free to create a GitHub issue: https://github.com/coralproject/talk/issues/new
|
||||
|
||||
## Compatibility with IE11
|
||||
|
||||
We strive to make the Comment Stream Embed usable in IE11 without being pixel-perfect. If you develop on the Comment Stream you need to be aware of the following:
|
||||
|
||||
### CSS Variables
|
||||
|
||||
In order to support IE11 on the Comment Stream, every time new CSS is loaded, you need to call `polyfillCSSVarsForIE11()`.
|
||||
|
||||
```ts
|
||||
import { polyfillCSSVarsForIE11 } from "coral-framework/helpers";
|
||||
|
||||
const loadProfileContainer = () =>
|
||||
import("./ProfileContainer" /* webpackChunkName: "profile" */).then(x => {
|
||||
// New css is loaded, take care of polyfilling those css vars for IE11.
|
||||
polyfillCSSVarsForIE11();
|
||||
return x;
|
||||
});
|
||||
```
|
||||
|
||||
### CSS Calc
|
||||
|
||||
Various bugs exists around `calc` support in IE11 (see https://caniuse.com/#feat=calc). We work around most of them by pre-transforming `calc` values using `postcss-calc-function`. Some css attributes might have an issue if you use `css-variables` inside `calc`.
|
||||
|
||||
Reference in New Issue
Block a user