Answer the question
In order to leave comments, you need to log in
How to set color via data-color?
I googled and didn't find a good solution. Found the answer here but they say that this method is not supported in many browsers.
In general, my goal is to make it so that the programmer can set the color through data-color. Because there will be many and different flowers.
Answer the question
In order to leave comments, you need to log in
Why is there no /u flag in preg_match? He will ignore the Cyrillic alphabet.
There is an official library from Twitter which, in particular, provides hashtag extraction functionality ( example for JS ).
If you look at the code, you will see that the real regexp is formed from pieces and its total final size is very large (I think a few kb). In addition, there is another problem, already specific to PHP - the PCRE library used as a regular expression engine for PHP does not support Unicode Surrogates , giving them an error Error 73 disallowed Unicode code point.
At one time, for one project, I converted an implementation from the Twitter library for PHP, if necessary, you can pick it up here. There is indeed a slight difference in the handling of mentions. it was necessary to take into account the specifics of Instagram, and as for the specifics of PCRE, see above.
well, store the color in the date attribute and use js to take it from there and do whatever you want with it. What is the problem?
https://jsfiddle.net/090ugdmf/1/
Make a js wrapper
<div class="header" data-color="{'color': 'red', 'property':'background'}">...</div>
<div class="footer" data-color="{'color': 'blue', 'property':'color'}">...</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question