From dfe6638aa017fb3ac644917a6f9322121a937a6d Mon Sep 17 00:00:00 2001 From: gtm-nayan Date: Mon, 21 Feb 2022 12:26:31 +0545 Subject: [PATCH] Reword --- .../tutorial/13-advanced-styling/03-inline-styles/text.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/content/tutorial/13-advanced-styling/03-inline-styles/text.md b/site/content/tutorial/13-advanced-styling/03-inline-styles/text.md index ea6b37c296..28aaf8312b 100644 --- a/site/content/tutorial/13-advanced-styling/03-inline-styles/text.md +++ b/site/content/tutorial/13-advanced-styling/03-inline-styles/text.md @@ -7,7 +7,7 @@ Apart from adding styles inside style tags, you can also add styles to individua Add the following style attribute to the paragraph element: `style="color: {color}; --o: {bgOpacity};"` -Great, now you can style the paragraph using variables that can change based on your input and you don't have to make a class for every possible value. +Great, now you can style the paragraph using variables that change based on your input without having to make a class for every possible value. This can however get unwieldly if you have to write a rather long string, and missing any of the semicolons will make it invalid. Svelte provides a nicer way to write inline styles and that is to use the style directive like this: @@ -18,4 +18,4 @@ This can however get unwieldly if you have to write a rather long string, and mi > ``` -They share a few qualities with the class directive. You can use a shorthand when the name of the property and the variable are the same. So `style:color="{color}"` can be written as just `style:color`. Another is that the directives will take precedence when you set the same property through a style attribute. \ No newline at end of file +They share a few qualities with class directives. You can use a shorthand when the name of the property and the variable are the same. So `style:color="{color}"` can be written as just `style:color`. Another is that the directives will take precedence when you set the same property through a style attribute. \ No newline at end of file