redefining mixed values [dynamic ids keep changing – RESOLVED]

Tagged: 

Author Posts

Pfeff

Heads up! this post was created when Microthemer was at version 3. The current version is 7. Some references to the interface may be out of date.

Hello there,
I’ve found the [mix] noted values N 1,2,3 Value 60px, 168px, 52px for example trying to modify some parameters. Is there any possibility to overwrite these values keeping the same structure redefining 3 different values please ?

Thanks,


Sebastian

Hi there,

The [mix] computed CSS tells you that your current selector is targeting multiple elements, and that the current value for e.g. ‘height’ is not the same. If you specify a new value of say ‘100px’ for height it will affect all elements. They will all get a height of 100px. Unless another style rule is more ‘specific’, in terms of CSS specificity, than your selector. This tutorial on CSS specificity may be useful: https://themeover.com/beginners-guide-to-understanding-css-specificity/ (even if it’s a bit off-topic from what you’re asking).

If you’re asking if there a way to define 3 different styles affecting the mixture of elements in one Microthemer editing field, the answer is no. If you don’t want all elements having the same value, you would need to create a separate selector for each element.

Does that help answer your question at all?

Cheers,
Sebastian


Pfeff

Thank you for your guides.
It looks like in my case I have to find a way to overwrite the plugin css values. I’ll try to find if is this possible using the extra css field of the theme, creating specified notes (instructions) for that plugin.


Sebastian

Hi Pfeff,

Microthemer should allow you to override the plugin’s default CSS styles. That’s the purpose of Microthemer! If it doesn’t work first time, you could try adding “!important” to the style rule by clicking the faint “i” to the right of the input field (which will appear if you have turned off “!important” globally via the preferences). If that doesn’t work, the plugin may also be using !important and trumping your CSS style by having a more specific CSS selector (e.g. #one #with #lots #of #ids).

Although it’s also possible that the plugin is using inline styles (style=”color:red”) in the HTML – which cannot be overridden by an external CSS stylesheet – which is where Microthemer puts all of it’s CSS styles:

/wp-content/micro-themes/active-styles.css

Or if the plugin sets the CSS with Javascript, which even overrides inline CSS styles.

Cheers,

Sebastian


Pfeff

Hi Sebastian,
“!important” globally is turned on, but true the plugin have a bunch of !important in the main structure.

.slabtexted .slabtext{
	display:-moz-inline-box;
	display:inline-block;
	white-space:nowrap
}
.slabtextinactive .slabtext{
	display:inline;white-space:normal;
	font-size:1em !important;
	letter-spacing:inherit !important;
	word-spacing:inherit !important;
	*letter-spacing:0 !important;
	*word-spacing:0 !important;
}
.slabtextdone .slabtext{
	display:block;line-height:1;text-align: center;
}

I’ll try to deal with it as is , finding the best solution.
regards,


Sebastian

Hmm, you should be able to override those styles. If you made them slightly more ‘specific’ by pre-pending them with a ‘body’ selector e.g.

body .slabtexted .slabtext

But could the 403 problems you raised in your other post be preventing your styles from working in general?
https://themeover.com/forum/topic/save-error-2/#post-5994

Cheers,
Sebastian


Pfeff

I thought about that 🙂 indeed, those problems could be somehow related. I’ll try to find where is the malfunction at least on this side of hosting structure (folder permissions etc) and come back with a feed-back.
kind regards,


Sebastian

OK great.


Pfeff

Hello there ,
I just came back with some details. Starting from scratch on a new fresh host space, I’ve installed WP, a theme and some plugins. I’ve made a few tests and at this point It would be nice If I’ll receive some guide lines.

In a few words here we have 2 test pages. anewpage and anewpage2 . The last one have this settings applied on “how” element :

/*** Microthemer Styles ***/

/* =Content
-------------------------------------------------------------- */
/* HOW */
div#slabText1058539 span.slabtext {
	position: relative !important;
	top: 369px !important;
}

After save and exit the microthemer page, The result unfortunately is not how it should be .

More that that even If I return on the edited page the settings are there in the CSS CODE MICROTHEMER window but are not applied.

Could you please try to install WP Responsive Auto Fit Text plugin for me and apply / save with microthemer the above mentioned settings in order to see if it works on your page ?

Perhaps there should be a workaround or something.
Thank you,


Abland

Hi, Pfeff,

The id is different on the test pages,
Above id: slabText1058539
Actual test page id: slabText378044

Try just targeting the class.


Pfeff

ok, how about how,

/*** Microthemer Styles ***/

/* =Content
-------------------------------------------------------------- */
/* HOW */
div#slabText1275884 span.slabtext {
	position: relative !important;
	top: 369px !important;
}

The result is in the picture, the same values applied and the test page is anewpage2 .

the id between these two test pages is different because anewpage is without microthemer settings applied and anewpage2 is with microthemer settings applied. There are two different pages.

If you are trying to say that slabText1275884 should be found somewhere in the source file of the anewpage2, (and as far as I can see is not ) maybe that’s the problem. The id is not updated when the settings are applied (?) I’m just saying…


Abland

Interesting – the Notio theme changes the id value on a page refresh. Your style rule is correct for that specific load of the page but the next load – like viewing on the live site – has a completely different id value.

So microthemer is creating the rules properly, but your theme keeps changing the id value. Try instead:

/* HOW */
div.slabtext-wrapper span.slabtext {
	position: relative !important;
	top: 369px !important;
}

Pfeff

Very true, I just realised that too creating another test page .looking at source file I was pretty confused 😀
But you just confirmed 😀

I’ve replaced the above mentioned microthemer code in the CSS CODE MICROTHEMER window
with your provided code but the text block is moved together with the second red block … as you can see

LE: I’ll try to do that on a basic WP theme like Twenty Thirteen or something .


Pfeff

LE2, ok, I am back. it’s not the theme. I’ve tried different theme (Twenty Thirteen) and I’ve found the same result. on refresh the id of the same text block is different. v. strange … any thoughts ?

could be the fact that I set the wp-config.php file permission to 600 ?


Pfeff

LE3 and sorry for this triple post
could be the fact that as I said a few posts ago, the microthemer is trying to modify a result of a plugin (a behavior) not a simple text block … (?) if anyone had a similar experience with this pair of plugins microthemer and WP Responsive Auto Fit Text a feedback will be much appreciated.


Abland

It’s the plugin itself that changes the id on refresh. I checked their demo site:
http://www.vibesdesign.com.au/wp-responsive-auto-fit-text-wordpress-plugin/

Check the source there and you’ll see the id change. The only thing you can do is try to target without using the id because it will change.


Pfeff

hello again, and thank you for your interest in helping me.
It’s clear. I think that I’ve found a workaround but I have to do more tests :

/* HOW */
article#post-2039 h1.note {
	position: relative !important;
	top: 369px !important;

.note is an extra CSS defined :

.note {
    padding: 0;
    font-family: Arial Black, Arial, sans-serif;
    font-weight: 900;
    color: #FFC900;
	} 

a little bit offtopic wp responsive auto fit text wordpress plugin have a documentation and maybe there is a possibility to define / change some parameters in css core but I’m not so sure how to do that .I reffer to plugin options. I don’t see something about the color changing but there is a line reffering at line spacing :

precision An Integer value that indicates the decimal precision to use when setting the CSS values line-height, word-spacing and font-size. Defaults to 3.

I know , I should contact the developing team but I’ve already done that before with no answer that’s why I “ve choosed microthemer to do some minor changes without being necessary to contact and wait for every developer feed-back 😛

PS: sorry Sebastian to mentioning about other plugin on your forum hope u’ll understand that I’m trying to make the things work somehow with or without microthemer (if his ability to handle these kind of requests are limited) .Any support will be much appreciated.


Sebastian

Abland, well done on spotting the dynamic IDs. I agree that the solution is to target classes – things that remain constant.

Pfeff – I’m glad you found a workaround. I see that the text doesn’t overlap any more when I view the demo page you referenced. I’m a bit unclear about what your final question was.

Thanks,
Sebastian


Pfeff

Hello Sebi,
The point it was to find a solution that could move the yellow HOW block somwhere closer to the red text block.
I exaggerated overlapping these two text blocks in order to show more clearly the desired result.

At this time the above mentioned test pages are left without article#post-2039 h1.note activated, I still have to do some tests as soon as I’m back home .

In your oppinion this article workaround could be a solution without receiving errors or malfunctions ?
it will be nice as I’ve mentioned, If I find a solution to modify the plugin behavior using his option settings.
Thanks,


Sebastian

Hey,

In addition to the problem of dynamic IDs that Abland identified, I think the more general problem you are facing when combing Microthemer with the slabText plugin is that slabText uses Javascript to set CSS values. Javascript defined CSS rules will always override regular CSS defined in a stylesheet (as Microthemer does).

It looks like the slabText plugin dynamically sets line-height, letter-spacing and font-size (and possibly some others) to achieve it’s goal. So your Microthemer styles for these properties will be overridden. Styles that slabText doesn’t override will still work of course, but there is a limit to what Microthemer can do when used with this plugin.

Cheers,
Sebastian

You must login or register to reply to this topic.