|
167 | 167 | "contributors": [],
|
168 | 168 | "code": "@mixin line-clamp($number) {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: $number;\n overflow: hidden;\n}\n"
|
169 | 169 | },
|
| 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 | + }, |
170 | 185 | {
|
171 | 186 | "title": "Text Gradient",
|
172 | 187 | "description": "Adds a gradient color effect to text.",
|
|
0 commit comments