source: src/components/image/utils.ts@ 5d6f37a

main
Last change on this file since 5d6f37a was 5d6f37a, checked in by Naum Shapkarovski <naumshapkarovski@…>, 7 weeks ago

add customer

  • Property mode set to 100644
File size: 433 bytes
RevLine 
[5d6f37a]1// ----------------------------------------------------------------------
2
3export function getRatio(ratio = '1/1') {
4 return {
5 '4/3': 'calc(100% / 4 * 3)',
6 '3/4': 'calc(100% / 3 * 4)',
7 '6/4': 'calc(100% / 6 * 4)',
8 '4/6': 'calc(100% / 4 * 6)',
9 '16/9': 'calc(100% / 16 * 9)',
10 '9/16': 'calc(100% / 9 * 16)',
11 '21/9': 'calc(100% / 21 * 9)',
12 '9/21': 'calc(100% / 9 * 21)',
13 '1/1': '100%',
14 }[ratio];
15}
Note: See TracBrowser for help on using the repository browser.