Comments (4)
I was able to make pretty check box handle wrapping of long text for labels and allow for click-able links within them with the following:
.pretty .state label {
white-space: normal;
text-indent: unset;
padding-left: 5vw; /* Change to your preferred dimensions */
}
/* This will make the use of an svg align correctly, you may need to add other formats if you use them. */
.pretty.p-svg .state .svg,
.pretty .state label:after,
.pretty .state label:before {
top: 0;
}
/* Make pretty checkbox handle links in labels, thanks goes to pmonte, for a pointer in the right direction */
.pretty a {
z-index: 3;
position: relative;
}
from pretty-checkbox.
Hi @Andruschenko ,
Thank you so much for the solution. 👍
I am aware of the fact that, label needs more customization. Rightnow, I am trying to move the complete logic out of label, which will solve this issue.
from pretty-checkbox.
Also, long labels are not responsive due to nowrap, see below. I tried fixing myself, but the CSS for layout is complicated and nothing seems to work. Do you happen to already have a solution? Will that be fixed in the next release? Thanks
.pretty {
... white-space: nowrap;
}
from pretty-checkbox.
What about:
.pretty a {
z-index: 3;
position: absolute;
margin-left: -1rem;
}
from pretty-checkbox.
Related Issues (20)
- E2E testing a component with this library
- Border still visible
- Using p-toggle and p-switch together cancels p-switch's slide animation
- Accessibility and Labeling
- Set button size independently from label HOT 2
- Its not getting selected in Mac
- Color override not working in react project
- Using @change throw error
- Project maintenance HOT 3
- Support RTL
- heroku HOT 1
- pretty-checkbox custom two colors
- required module 'shallow-clone'
- Disabled fieldset style is not applied
- Using <i> icon as label breaks the design
- Label required. This should show in docs.
- Start with state on by default HOT 3
- Change label placement HOT 1
- on mdb4 theme not working
- Slow loading link css HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pretty-checkbox.