Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
fleischie committed Sep 5, 2018
2 parents 38b22ba + f5a058f commit 83cccff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion after/syntax/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ syn match cssError contained "{@<>"

" extend javascript matches to trigger styledDefinition highlighting
syn match jsTaggedTemplate extend
\ "\<css\>\|\<keyframes\>\|\<injectGlobal\>\|\<fontFace\>"
\ "\<css\>\|\<keyframes\>\|\<injectGlobal\>\|\<fontFace\>\|\<createGlobalStyle\>"
\ nextgroup=styledDefinition
syn match jsFuncCall "\<styled\>\s*(.\+)" transparent
\ nextgroup=styledDefinition
Expand Down
13 changes: 12 additions & 1 deletion examples/apis.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const genericTemplateString = `
* Note: As glamor and emotion use similar APIs, only the extraneous APIs are
* mentioned later on.
*/
import styled, { css, keyframes, injectGlobal } from 'styled-components';
import styled, { css, keyframes, createGlobalStyle } from 'styled-components';

// match of styled.method api
// - unmatched cssTagName (note the double typoes and missing highlighting)
Expand Down Expand Up @@ -109,6 +109,17 @@ injectGlobal`
margin: 0;
}
`;
// - createGlobalStyle
createGlobalStyle`
@font-face {
font-family: 'Operator Mono';
src: url('../fonts/Operator-Mono.ttf');
}
body {
margin: 0;
}
`;

// class based stylings
class Container {
Expand Down

0 comments on commit 83cccff

Please sign in to comment.