rem
PX to REM conversion tag for web development, made by Asty'#8926.
Privateunrated
Content
44 lines{=(syntax):!rem <px value> [root font-size in px, defaults to 16]}
{=(jargs):{join(~):! {args}}}
{=(pxValue):{list(1):{jargs}}}
{=(optionalRoot):{list(2):{jargs}}}
{=(defaultFontSize):16}
{=(is1Num):{in({m:sgn({pxValue})}):-1 0 1}}
{=(is2Num):{in({m:sgn({optionalRoot})}):-1 0 1}}
{=(rootFontSize):{{if({is2Num}==true):optionalRoot|defaultFontSize}}}
{=(tool):https://nekocalc.com/px-to-rem-converter}
{=(conversionTable):https://cdn.discordapp.com/attachments/337040974415003649/918185909436944414/unknown.png}
{=(r):replace}
{=(conversion):{{r}(Z,):{{r}(.0Z,):{m:{pxValue}/{rootFontSize}}Z}}}
{=(image):{{if({is1Num}==false):conversionTable}}}
{embed(URL):{tool}}
{embed(title):PX to REM Converter}
{embed(color):#2f3136}
{=(helpMsg):```css
{syntax}
```}
{=(normalMsg):**Input**
`{pxValue}px`
**Output**
`{conversion}rem`
Calculation based on a root `font-size` of `{rootFontSize}px`.}
{=(output):{{if({is1Num}==false):helpMsg|normalMsg}}}
{=(debug):__Debug:__
rootFontSize: {rootFontSize}
is1Num: {is1Num}
is2Num: {is2Num}
}Embed
1 line{"color": 5198940, "description": "{output}"}Raw JSON
{
"id": 1184638,
"created_at": "2021-12-08T17:21:13.000Z",
"tag_name": "rem",
"nsfw": false,
"owner_id": "149926720114262016",
"uses": 26,
"description": "PX to REM conversion tag for web development, made by Asty'#8926.",
"restricted": false,
"shared": false,
"deleted": false,
"safe": "unrated",
"hidden": false,
"guild_id": "314660900302749696",
"sharer": "149926720114262016",
"content": "{=(syntax):!rem <px value> [root font-size in px, defaults to 16]}\n\n{=(jargs):{join(~):! {args}}}\n{=(pxValue):{list(1):{jargs}}}\n{=(optionalRoot):{list(2):{jargs}}}\n\n{=(defaultFontSize):16}\n\n{=(is1Num):{in({m:sgn({pxValue})}):-1 0 1}}\n{=(is2Num):{in({m:sgn({optionalRoot})}):-1 0 1}}\n\n{=(rootFontSize):{{if({is2Num}==true):optionalRoot|defaultFontSize}}}\n\n{=(tool):https://nekocalc.com/px-to-rem-converter}\n{=(conversionTable):https://cdn.discordapp.com/attachments/337040974415003649/918185909436944414/unknown.png}\n\n{=(r):replace}\n\n{=(conversion):{{r}(Z,):{{r}(.0Z,):{m:{pxValue}/{rootFontSize}}Z}}}\n\n{=(image):{{if({is1Num}==false):conversionTable}}}\n\n{embed(URL):{tool}}\n{embed(title):PX to REM Converter}\n{embed(color):#2f3136}\n\n{=(helpMsg):```css\n{syntax}\n```}\n{=(normalMsg):**Input**\n`{pxValue}px`\n**Output**\n`{conversion}rem`\n\nCalculation based on a root `font-size` of `{rootFontSize}px`.}\n\n{=(output):{{if({is1Num}==false):helpMsg|normalMsg}}}\n\n{=(debug):__Debug:__\nrootFontSize: {rootFontSize}\n\nis1Num: {is1Num}\nis2Num: {is2Num}\n}",
"embed": "{\"color\": 5198940, \"description\": \"{output}\"}",
"last_fetched": "2026-10-20T18:07:37.906Z"
}