Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introducing styled-elements - DOM primitives with CSS template strings #67

Open
SilentCicero opened this issue Feb 5, 2017 · 0 comments

Comments

@SilentCicero
Copy link

lol. Was bored and made this, works well with yo-yo and choo. Based on styled-components for React.

npm install --save styled-elements

Usage

import styled from 'styled-elements';

const Header = styled.h2`
  color: #333;
`;

const MyButton = styled.button`
  padding: 10px;
  border-radius: ${0}px;
  background: #F1F1F1;

  &:hover {
    background: #555;
  }
`;

const Wrapper = styled.div`
  width: 500px;
  border: 1px solid #aaa;

  @media (min-width: 400px) {
    width: 100%;
    background: #F1F1F1;
  }
`;

document.body.appendChild(Wrapper()(
  Header()('My header!'),
  MyButton({ onclick: () => console.log('yay!') })(
    'Do Something'
  )
));

See: https://github.com/SilentCicero/styled-elements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant