BemtvJS
Github
  • README
  • Getting started
  • Introducing Brackethtml
  • Creating components
  • Defining the template
  • Rendering
  • Styling the component
  • .css() methods
  • SuperComponent
  • Hooks
  • Handling events
  • Isolated and special variables
  • Component proxies
  • No “props”!
  • Functional components - onInst()
  • DOM Elements
  • Bindings
  • Transformation Functions
  • Router(automatic routing)
    • Capturing errors
    • useRouteControl()
  • Lazy components
  • Suspense
  • State management
  • Keeping the instance running
  • run() - For all
  • Checking available components
  • And that’s it
Powered by GitBook
On this page

Styling the component

In addition to the style that can be applied directly to the template, a great option is to use the css() method:

import { _ } from "bemtv";

const { css, template } = _`App`();

css`
  color: blue;
  font-size: 20px;
`;

template`h1[Hello world!]`;

PreviousRenderingNext.css() methods

Last updated 2 years ago