aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2014-04-21 17:17:29 -0400
committerTeddy Wing2014-04-21 17:17:29 -0400
commit467d895401b05d5e7ba0431d541593926af7e597 (patch)
tree82d2af3439d25bf37c9c06ab49778af4ae45096d
parentaa92a665b10bef4930e5e7e00039a742d5cce6fa (diff)
downloaddjango-sneak-peek-467d895401b05d5e7ba0431d541593926af7e597.tar.bz2
README: update Customising section
* Add more information about how the template tag works * Modify the CSS example to be more explicit now that the `.django-sneak-peek` class doesn't apply any styles of its own.
-rw-r--r--README.md5
1 files changed, 3 insertions, 2 deletions
diff --git a/README.md b/README.md
index 3ab94ad..a988372 100644
--- a/README.md
+++ b/README.md
@@ -140,11 +140,12 @@ Preferred for inline-block elements. Sets `display: inline-block;` on the sneak
## Customising
As you may have guessed, you can add custom display styles to `django-sneak-peek`. In addition to overriding the existing CSS classes, you can also create your own.
+The `sneak_peek` template tag argument is passed directly to the `class` attribute of the sneak peek wrapper `<div>`.
+
Here's an example of a class you can add to your CSS to add custom styles to a sneak peek element:
.django-sneak-peek.green-border {
- border-color: green;
- border-width: 5px;
+ border: 5px solid green;
}
This custom class can be applied with: