mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-20 11:20:41 -07:00
use a table to show input/output
This commit is contained in:
@@ -4,11 +4,9 @@ title: capitalize
|
|||||||
|
|
||||||
`capitalize` ensures the first character of your string is capitalized.
|
`capitalize` ensures the first character of your string is capitalized.
|
||||||
|
|
||||||
{% highlight liquid %}
|
| Input | Output |
|
||||||
{% raw %}
|
|------------------------------------:|:-----------------|
|
||||||
{{ "title" | capitalize }}
|
| `{ "title" | capitalize }` | "Title" |
|
||||||
{% endraw %}
|
| `{ "my great title" | capitalize }` | "My great title" |
|
||||||
# => "Title"
|
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
It only capitalizes the first character, so subsequent words will not be capitalized as well.
|
It only capitalizes the first character, so subsequent words will not be capitalized as well.
|
||||||
|
|||||||
@@ -135,3 +135,38 @@ hr {
|
|||||||
background-color: lighten($color-slate, 50%);
|
background-color: lighten($color-slate, 50%);
|
||||||
margin-bottom: $spacing-unit/2;
|
margin-bottom: $spacing-unit/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
display: block;
|
||||||
|
margin: 15px 0;
|
||||||
|
border-collapse: collapse;
|
||||||
|
thead {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
font-size: 100%;
|
||||||
|
font: inherit;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 6px 13px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
tbody {
|
||||||
|
vertical-align: middle;
|
||||||
|
border-color: inherit;
|
||||||
|
}
|
||||||
|
tr {
|
||||||
|
border-top: 1px solid #ccc;
|
||||||
|
background-color: #fff;
|
||||||
|
vertical-align: inherit;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
padding: 6px 13px;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user