Skip to content

Declare CSS within a component #65

Description

@baraqkamsani

Currently, styling is split from a file.

In SomeComponent.astro, we have this:

---
// ...
---

<SomeComponent>
<!-- ... -->
</SomeComponent>

In index.css, we have this:

/* ================================================================= */
/* /src/components/SomeComponent.astro */

/* Styling Here */

/* ================================================================= */

Is it better if we place the style declarations within the component/layout? Like so:

---
// SomeComponent.astro
// ...
---

<SomeComponent>
<!-- ... -->
</SomeComponent>

<style>
/* Styling Here */
</style>

Any other suggestions to help with maintenance/workflow is welcome and appreciated 🙂

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalSuggest modifications. If issue has the "accepted" label then it is planned.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions