From 696c4078d1318ec28ddada227449a4acaf52dee7 Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Tue, 13 Nov 2018 07:30:17 +0100 Subject: [PATCH] Customize browse text of the custom file input with HTML (#27651) --- 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 9088662fda..e999daf0ca 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 64ec2cea2f..29f7fc10bc 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 `