Skip to content

Commit d24fcaa

Browse files
committed
Add note about CSS isolation
1 parent 4cc502d commit d24fcaa

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

knowledge-base/in-place-editor.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ The sample below uses an algorithm which toggles between read-only UI and an edi
5656

5757
The features and business logic below can be subject to additional customizations and enhancements.
5858

59-
Replace `YourAppName` with the actual root namespace of your app.
59+
To run the code successfully:
60+
61+
* Replace `YourAppName` with the actual root namespace of your app.
62+
* Make sure your app supports CSS isolation and loads a `YourAppName.styles.css` file. Browser caching of this file can prevent the InPlaceEditor styles from showing.
6063

6164
<div class="skip-repl"></div>
6265

@@ -688,6 +691,12 @@ Replace `YourAppName` with the actual root namespace of your app.
688691
}
689692
````
690693
````InPlaceEditor.razor.css
694+
/*
695+
This .razor.css file relies on Blazor CSS isolation, which in turn requires a YourAppName.styles.css file in App.razor.
696+
Make sure that the browser doesn't load an old cached version of this file, otherwise you may not see the InPlaceEditor styles.
697+
A symptom of this problem are persistent icons when ShowIcons="InPlaceEditorShowIcons.Hover".
698+
*/
699+
691700
.in-place-editor {
692701
display: inline-flex;
693702
font-family: monospace;

0 commit comments

Comments
 (0)