Skip to content

Commit 9e89a9c

Browse files
committed
Update consolidated snippets
1 parent 84c58ac commit 9e89a9c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

public/consolidated/scss.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,21 @@
167167
"contributors": [],
168168
"code": "@mixin line-clamp($number) {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: $number;\n overflow: hidden;\n}\n"
169169
},
170+
{
171+
"title": "Function to convert px to rem",
172+
"description": "This function will convert px values to rem values.",
173+
"author": "gihanrangana",
174+
"tags": [
175+
"sass",
176+
"function",
177+
"pixel",
178+
"rem",
179+
"px-to-rem",
180+
"css"
181+
],
182+
"contributors": [],
183+
"code": "@function px-to-rem($px, $base: 16px) {\n @return ($px / $base) * 1rem;\n}\n\n// Usage\ndiv {\n font-size: px-to-rem(12px); // Output: 0.75rem\n padding: px-to-rem(16px); // Output: 1rem\n margin: px-to-rem(32px) // Output 2rem\n}\n"
184+
},
170185
{
171186
"title": "Text Gradient",
172187
"description": "Adds a gradient color effect to text.",

0 commit comments

Comments
 (0)