question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RFC] Pluggable styling API

See original GitHub issue

What

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:closed
  • Created 5 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
kettanaitocommented, Dec 5, 2019

@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.

1reaction
bittttttencommented, Feb 12, 2020

Ahh you pulled it off! Congrats ✨

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found