Field Typography doesnt output
Hi @dovy! You and the Redux Team are doing a great job! One of the lastest commits make the field typography to stop outputing the css. Maybe its releated to another issue? Thanks for your effort!
Just fixed. Sorry about that. I was playing with inheritance.
Hi! The fix seems to work for the output, but it doenst seem to add the @import of the Google Fonts. Also, I have noticed that the output is repeating (number of fields * number of output selectors).
Please explain that last bit more? I don't quite understand. Remember now, I've combined all the output strings to one tag instead of multiple.
Hi, its strange because you introduced a boolean for check that output method only happens once, but it still get executed for each typography field. I'm checking line by line and I found some things:
$this->fieldTypographySet is ignored $this->options need to be changed to $this->parent->options makeGoogleWebfontLink is called for every typography field The newOutCSS get all the selectors for every typography field. (For example: I have an output for #header h1 with one Google Font, and another for #main h2 with different Google Font. I get the two outputs for both selectors)
#header h1 {
font-family:GoogleFont1;
font-size: 100px;
}
#main h2 {
font-family:GoogleFont1;
font-size:100px;
}
#header h2 {
font-family:GoogleFont2;
font-size:50px;
}
#main h2 {
font-family:GoogleFont2;
font-size:50px;
}
Hope that helps. Im creating my version of makeGoogleWebfontLink. I'll have in a couple of minutes.
Ha, good call. I think i just fixed it.
Please verify.
Ok, haha, right now you fixed one of the issues, but the unsolved one is causing all my typography get 64px height xD Now seriously, it worked but need just one change in line 411 of field_typography.php:
$font = $this->parent->options[$field['id']];
Can you do a quick reset? That shouldn't require me to use the parent. The value is passed down.
Hey, after the reset it still need to get the value from the parent. any sugestion? Should I delete all plugin files and get all again from the repo?
Hi @dovy, sorry for the delay. I've made a full reset of the installation (delete the ReduxFramework folder an make a new clone). The problem still persist. After apply my fix, I found also that the word-spacing and letter-spacing are inserted in the CSS even if no value is specified.
Ok, I am pretty positive I just resolved it. Please re-verify.
No lucky :( I still have all typography with the same size
That is supposed to be the main column and the sidebar of the theme xD
Really fixed this time. ;)
Yeah! It worked now. Thanks @dovy
NP. ;)