Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update global.css file #1031

Merged
merged 15 commits into from
Mar 13, 2024
Merged

Update global.css file #1031

merged 15 commits into from
Mar 13, 2024

Conversation

EthanThatOneKid
Copy link
Owner

Update the global.css file to reduce redundancy and improve CSS reusability.

karnikaavelumani and others added 13 commits March 12, 2024 16:01
These changes improve reusability and utility of global.css variables.

Script:

```ts
const result = `<code>`.split("\n").map((line) => {
  const [lhv, rhv] = line.split(":");
  return `${lhv}-rgb: ${
    rgbFromHexString(rhv).join(", ")
  };\n${lhv}: rgba(var(${lhv}-rgb), 1);`;
});

console.log(result.join("\n"));

function rgbFromHexString(code: string): [number, number, number] {
  const hex = code.trim().replace(/^#/, '');
  return [
    parseInt(hex.substring(0, 2), 16),
    parseInt(hex.substring(2, 4), 16),
    parseInt(hex.substring(4, 6), 16),
  ];
}
```
Copy link

netlify bot commented Mar 13, 2024

Deploy Preview for acmcsuf ready!

Name Link
🔨 Latest commit 165b379
🔍 Latest deploy log https://app.netlify.com/sites/acmcsuf/deploys/65f12e67b6391f0008e5f793
😎 Deploy Preview https://deploy-preview-1031--acmcsuf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@karnikaavelumani karnikaavelumani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@EthanThatOneKid EthanThatOneKid merged commit fffcade into main Mar 13, 2024
6 checks passed
@EthanThatOneKid EthanThatOneKid deleted the fix/921 branch March 13, 2024 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants