@w0s/writing-mode
v1.0.0
Published
Get the CSS `writing-mode` status of the element
Downloads
14
Readme
Get the CSS writing-mode
status of the element
Examples
<script type="importmap">
{
"imports": {
"@w0s/writing-mode": "..."
}
}
</script>
<script type="module">
import WritingMode from '@w0s/writing-mode';
const writingMode = new WritingMode(document.querySelector('p'));
const value = writingMode.value; // 'vertical-rl'
const horizontal = writingMode.isHorizontal(); // false
const vertical = writingMode.isVertical(); // true
</script>
<p style="writing-mode: vertical-rl">text</p>
Constructor
new WritingMode(
element: HTMLElement
)