From 865a6c6a357e97d2696862f2f9ecdb01cb04b8b0 Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Sun, 11 Nov 2018 15:00:22 +0100 Subject: [PATCH] Customize browse text with HTML --- scss/_custom-forms.scss | 4 ++++ site/docs/4.1/components/forms.md | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/scss/_custom-forms.scss b/scss/_custom-forms.scss index 9088662fda86..e999daf0ca8b 100644 --- a/scss/_custom-forms.scss +++ b/scss/_custom-forms.scss @@ -276,6 +276,10 @@ content: $value; } } + + ~ .custom-file-label[data-browse]::after { + content: attr(data-browse); + } } .custom-file-label { diff --git a/site/docs/4.1/components/forms.md b/site/docs/4.1/components/forms.md index 64ec2cea2f25..29f7fc10bc59 100644 --- a/site/docs/4.1/components/forms.md +++ b/site/docs/4.1/components/forms.md @@ -1287,7 +1287,7 @@ The file input is the most gnarly of the bunch and requires additional JavaScrip We hide the default file `` via `opacity` and instead style the `