Skip to content

Commit ad1f05d

Browse files
committed
chore: Fix some old syntax in the documentation.
1 parent 3fcaa51 commit ad1f05d

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

Diff for: ARCHITECTURE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ For example, given this Block file and template:
144144
```
145145

146146
```handlebars
147-
<div class="class-0" state:active={{isActive}}>
148-
<div class="{{style-if isColorful 'class-1'}}" state:color={{dynamicColor}}>
147+
<div block:class="class-0" block:active={{isActive}}>
148+
<div block:class="{{style-if isColorful 'class-1'}}" block:color={{dynamicColor}}>
149149
```
150150

151151
We can easily conceptualize the `RewriteMapping` data for each element in development mode, when the CSS output is just BEM.

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,9 @@ However, whatever the implementation is, it will feel as though you're interfaci
279279

280280
```hbs
281281
{{!-- :scope selector is automagically applied to the template's root-level element. Thanks Glimmer! --}}
282-
<section state:enabled={{isEnabled}}>
283-
<button class="button">
284-
<div class="icon" state:inverse={{isInverse}}></div>
282+
<section block:enabled={{isEnabled}}>
283+
<button block:class="button">
284+
<div block:class="icon" block:inverse={{isInverse}}></div>
285285
{{value}}
286286
</button>
287287
</section>

Diff for: packages/@css-blocks/core/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,19 @@ For example, given the following Block file, we can determine the type of usage
156156

157157
Static styles are guaranteed to never change:
158158
```handlebars
159-
<div class="my-class" state:active="true"></div>
159+
<div block:class="my-class" block:active="true"></div>
160160
```
161161

162162
Dynamic styles may or may not be applied depending on application state:
163163
```handlebars
164-
<div class="{{style-if value 'my-class'}}" state:active={{isActive}}></div>
164+
<div block:class="{{style-if value 'my-class'}}" block:active={{isActive}}></div>
165165
```
166166

167167
Mutually Exclusive styles are guaranteed to never be used on the element at the same time:
168168
```handlebars
169169
{{!-- `my-class` and `other-class` are mutually exclusive --}}
170170
{{!-- `[color=red]` and `[color=blue]` are mutually exclusive --}}
171-
<div class="{{style-if value 'my-class' 'other-class'}}" state:color={{color}}></div>
171+
<div block:class="{{style-if value 'my-class' 'other-class'}}" block:color={{color}}></div>
172172
```
173173

174174
Every Template Integration's syntax for consuming Blocks will differ slightly. It is the responsibility of the integration to implement template parsing and Block object discovery to feed in to the `ElementAnalysis` APIs. You can read more about these style tracking methods on the [`ElementAnalysis` API documentation][https://css-blocks.com/api/classes/_css_blocks_core.elementanalysis.html].

Diff for: packages/@css-blocks/ember-cli/tests/dummy/app/templates/node-modules-resolution.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div></div>
2-
{{!-- <div state:enabled={{enabled}} id="addon-component-scope">
2+
{{!-- <div block:enabled={{enabled}} id="addon-component-scope">
33
Node Module Resolution Scope Styles State: {{enabled}}
4-
<div class="sub-class" id="addon-component-sub-class" state:enabled={{enabled}}>
4+
<div class="sub-class" id="addon-component-sub-class" block:enabled={{enabled}}>
55
Node Module Resolution Sub-Class Styles State: {{enabled}}
66
</div>
77
<button {{action "toggleEnabled"}} id="toggle-enabled">Toggle Enabled States</button>

Diff for: packages/@css-blocks/website/src/pages/Home/components/CodeDemo/demos/code.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ const data: Data = {
7272
],
7373

7474
glimmerExample: `
75-
<button state:inverse={{inverse}} state:size={{size}}>
75+
<button block:inverse={{inverse}} block:size={{size}}>
7676
{{#if icon}}
77-
<span class="icon">
77+
<span block:class="icon">
7878
{{icon}}
7979
</span>
8080
{{/if}}

0 commit comments

Comments
 (0)