Skip to content

Declare CSS within a component #65

@baraqkamsani

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 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions