npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@magnetis/astro-css

v1.1.0

Published

CSS Implementation of Magnetis design system

Downloads

1

Readme

astro-css

Astro

A design system by Magnetis 👩‍🚀

Build Status

Table of contents

Introduction

Made for Magnetis' designers, developers, product managers, data analysts, data scientists, stakeholders and enthusiasts, Astro helps us protect the brand concepts, elevate consistency of user experience and increase the speed and efficiency of how we design and build products for our customers.

We believe that a good user experience is built with consistent design, well defined visual and interaction patterns, carefully built emotions and made for all. Therefore, Astro is essentially:

Atomic

Astro is built based on Atomic Design, so our designers and developers can use its style set and components to enhance our product interface, as a modular system that can be easily managed and updated.

Open

Magnetis believes that good design and experiences can impact the product market and society itself. Our design and code assets are open so we can contribute to the community and help new product teams.

Accessible

Design is meant to be for all. Astro style and components follow basic recommendations from the WCAG guidelines for accessibility, with tested contrast ratios and good practices in legibility and screen reading solutions. See WCAG >>

Supported libraries

For now, Astro only supports React as its official library.

Adding Astro to your project

Installing the dependency

Install Astro via terminal: Run yarn add @magnetis/astro or npm install @magnetis/astro.

Using via CDN

<link
  href="https://unpkg.com/@magnetis/astro/dist/astro.css"
  rel="stylesheet"
  type="text/css"
/>

Using Astro

Ready to start coding with Astro? Follow the instructions in the docs (astro.magnetis.com.br) to learn how to use our components. You'll also see how to apply attribute modifiers (such as classes) to your HTML elements and React components.

Here's a quick example. If you'd like to create a Display text styled in Astro typography:

  1. Complete all install steps listed above;

  2. Import Astro in your file through one of the following methods:

    • Inside the <head> tag:

      <head>
        <link
          href="/node_modules/@magnetis/astro/dist/astro.css"
          rel="stylesheet"
          type="text/css"
        />
      </head>
    • With ES6 modules: import "@magnetis/astro";

    • With commonjs: require("@magnetis/astro");

  3. Go to Astro's Typography page;

  4. See that the "Display" section guides you to create a <p> element with a specific text display class;

  5. Replicate the instructions in your page file and make sure the correct styles have been applied;

  6. If your styles aren't rendered correctly, make sure Astro has been successfully installed into your project tree and astro.css is correctly imported.

Although our CSS variables are available in the bundle, it's important to emphasize that you should use Astro classes whenever possible, instead of using the variables directly. Always look for the element you're creating in the docs before you start to build it from scratch.

In other words, avoid this:

.paragraph {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.5;
  color: var(--color-moon-900);
}
<p class="paragraph">Don't do this</p>

In the example above, all these properties could be replaced with using the a-text--large class in the paragraph element. Like so:

<p class="a-text--large">Do this!</p>

Customizing styles

In case you absolutely have to customize one or more properties in an Astro component, you should still use the corresponding Astro class that's closer to your goal and override it with your custom properties. You can do this:

.my-paragraph {
  color: var(--color-moon-700); /* override default Astro color */
}
<p class="a-text--large my-paragraph">Customize like this</p>

Troubleshooting

  • If you copy the markup from an example in our documentation, don't forget to change the attributes "className" to "class" and "htmlFor" to "for" if you're not in a React environment like our docs are.

Contact us

Found a bug? Please see if it was already reported on our issues page. If you can't find a matching report, you can open a new issue including as much information as you can gather. We appreciate it!

Any lingering questions? You can contact us at [email protected].

Thank you for using Astro! 🎉