Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Notes Field support in Matrix Blocks #41

Open
BenParizek opened this issue Mar 18, 2018 · 3 comments
Open

Improve Notes Field support in Matrix Blocks #41

BenParizek opened this issue Mar 18, 2018 · 3 comments
Labels
cX under consideration feature

Comments

@BenParizek
Copy link
Member

Right now, there is now way to build the class name to target the specific notes field the Matrix Block ID appears unavailable in the getInputHtml method and seems to get swapped in via Javscript later. the "499" number is hard coded below. The below mostly works aside from that.

.field[id=fields-FIELDHANDLE-field] {
background-color: #fafafa;
border: 1px solid #e3e5e8;
padding: 0;
border-radius: 5px;
}
.field[id=fields-FIELDHANDLE-field] .heading,
.matrixblock .field[id=fields-matrixField-499-fields-FIELDHANDLE-field] .heading {
background: #ebedef;
padding: 7px 14px 7px;
}
.field[id=fields-FIELDHANDLE-field] .input,
.matrixblock .field[id=fields-matrixField-499-fields-FIELDHANDLE-field] .input {
padding: 2px 14px 14px;
}
.matrixblock .field[id=fields-matrixField-499-fields-FIELDHANDLE-field] {
background: #f4f4f4;
}
.field[id=fields-FIELDHANDLE-field] label
.matrixblock .field[id=fields-matrixField-499-fields-FIELDHANDLE-field] label {
color: #576575;
cursor: pointer;
display: block;
font-size: 1em;
font-weight: bold;
}
.field[id=fields-FIELDHANDLE-field] ul,
.matrixblock .field[id=fields-matrixField-499-fields-FIELDHANDLE-field] ul {
color: #232323;
list-style-type: disc;
margin: 0 0 1em 3em;
}

/fields-matrixField-BLOCK-fields-matrixNotes/

@BenParizek BenParizek added the cX under consideration label Jul 28, 2018
@missmatsuko
Copy link

Do note field styles not work at all when it's used in a Matrix?

Can you add classes that don't have the field ID or name at all instead? e.g. sproutnotes-zebra-stripes

@BenParizek
Copy link
Member Author

@missmatsuko I haven't tested this since this was originally posted. I expect it still works similar.

I'm open to supporting it if you find a reasonable way, but recall when I looked at it the whole thing felt like it was requiring way too much code to maintain for a relatively simple feature and I didn't have the time to sort it all out. After that, I really just haven't got around to prioritizing it though so, still on the list at some point whenever I find that chance.

@BenParizek
Copy link
Member Author

To your point regarding adding just a completely different class, I guess we could explore that. I'd need to familiarize myself with the code to say more and I'm pretty busy for the next couple weeks right now.

In the short run you could probably just add that class using the CP CSS or JS plugin if it helps you out. Kind of a broad stroke for a targeted thing, but if you need it to happen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cX under consideration feature
Projects
None yet
Development

No branches or pull requests

2 participants