redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

Field Typography doesnt output

Open vertigo7x opened this issue 12 years ago • 15 comments

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!

vertigo7x avatar Dec 06 '13 23:12 vertigo7x

Just fixed. Sorry about that. I was playing with inheritance.

dovy avatar Dec 07 '13 00:12 dovy

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).

vertigo7x avatar Dec 07 '13 08:12 vertigo7x

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.

dovy avatar Dec 07 '13 15:12 dovy

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.

vertigo7x avatar Dec 07 '13 17:12 vertigo7x

Ha, good call. I think i just fixed it.

dovy avatar Dec 07 '13 20:12 dovy

Please verify.

dovy avatar Dec 07 '13 20:12 dovy

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']];

vertigo7x avatar Dec 07 '13 21:12 vertigo7x

Can you do a quick reset? That shouldn't require me to use the parent. The value is passed down.

dovy avatar Dec 07 '13 22:12 dovy

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?

vertigo7x avatar Dec 07 '13 23:12 vertigo7x

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.

vertigo7x avatar Dec 08 '13 23:12 vertigo7x

Ok, I am pretty positive I just resolved it. Please re-verify.

dovy avatar Dec 10 '13 16:12 dovy

No lucky :( I still have all typography with the same size captura-de-pantalla-2013-12-10-19 04 03 That is supposed to be the main column and the sidebar of the theme xD

vertigo7x avatar Dec 10 '13 19:12 vertigo7x

Really fixed this time. ;)

dovy avatar Dec 10 '13 20:12 dovy

Yeah! It worked now. Thanks @dovy

vertigo7x avatar Dec 10 '13 22:12 vertigo7x

NP. ;)

dovy avatar Dec 10 '13 22:12 dovy