[RFC] Pluggable styling API
See original GitHub issueWhat
I propose to establishing a support for different CSS-in-JS libraries to help developers take benefits of Atomic Layout using their favorite styling solution.
Why
- The library operates on CSS properties Object, which can be computed into string (when needed), and be compliant with about any modern CiJ solution
Implementation
To enable such support it has been decided to convert the library to a monorepo that consist of the following parts:
- core library (
@atomic-layout/core
, responsible for media queries calculation, areas parsing, parametric components generation without attachment to any specific styling/rendering solution) - rendering libraries (i.e.
@atomic-layout/emotion
)
All rendering libraries would list @atomic-layout/core
as a dependency and utilize functions and types the core library exports.
Usage
To use Atomic Layout with another styling solution (implying that such solution is supported) import the respective @atomic-layout/X
package and use it with the same API described in the documentation:
import React from 'react'
import { Composition } from '@atomic-layout/emotion'
const MyComponent = () => (
<Composition templateCols="250px 1fr">
<span>Emotion support</span>
<span>Example</span>
</Composition>
)
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
Evolving the new service builder API - AWS Rust SDK Design
RFC 20 introduced a new service builder API. It supports fine-grained configuration at multiple levels (per-handler middlewares, router middlewares, ...
Read more >RFC 7452 - IETF
To offer familiarity for developers, typically a RESTful API design in combination with a federated authentication and authorization technology (like OAuth 2.0 ...
Read more >RFC 5000: Internet Official Protocol Standards
It also reclassifies RFCs that were previously published as STD 1 as Historic. ... Service Application Program 4462* Interface (GSS-API) Authentication and ...
Read more >Re: [RFC PATCH 0/9] patchable function pointers for pluggable ...
If you really want to do it PLT-style, then just do: extern void ... 2018-10-05 8:13 ` [RFC PATCH 7/9] crypto: crct10dif/generic -...
Read more >1. Introduction - REST API Design Rulebook [Book] - O'Reilly
The REST architectural style is commonly applied to the design of APIs for ... which has pluggable format and schema components, as described...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bitttttten thanks for the feedback. The first step to support emotion is coming to an end, I’m yet to verify a few nuances and about to merge. The second step would be to create and publish the actual
@atomic-layout/emotion
package.Ahh you pulled it off! Congrats ✨