How do I make tags different colors? - tumblr

On my blog I want specific tags to be different colors. So say a post is tagged with #photo post I'd like it to be red. #audio post might be blue, #quote post might be yellow and so on and so forth.
Unspecified tags would remain the default tag color.
When I do
.text_post {color:#ffffff;}
for example, it changes the text color and tag symbols, but not the tags themselves
I would appreciate any help on figuring this out! I don't know much about coding unfortunately.

The color doesn't change because the tags have their own colors applied to them separately. Basically what happens is you have a text_post class applied to the tag, but then a later style overwrites this to apply a separate color to the tags of this (and presumably every other) category of posts.
First, make sure you find the spots in the code (if any) that assign colors to the tags, probably (but not necessarily) through the class .tag.
Something like .text_post .tag [put your css styles here WITHOUT THE BRACKETS] should then work, but do note that if your code applies a different class from "tag" (which is what the version currently live uses) to the tag links, this will not work. Note that links have separate states (:link, :visited, :hover, :active) and you have to make sure they are all covered by the instruction for each class of posts, or they will revert to default, identical colors when clicked or visited (browser don,t usually have a :hover style by default).

Related

Why is the textfield label purple in smui?

I installed the svelte material ui component library in my svelte project. Unfortunately
the floating label is colored purple by the following css rule provided by the smui-package. How can I fix this?
css in dev tools
.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label {
color:rgba(98, 0, 238, 0.87) //purple
}
smui textfield
<Textfield bind:value={valueA} label="Label">
<HelperText slot="helper">Helper Text</HelperText>
</Textfield>
I am guessing you are using the default bare.css stylesheet, probably as a CDN package. While it is possible to override some of that base theming using CSS variables, Textfield labels cannot be overridden that way. (If you're interested, see this REPL verifying that, in fact, labels are not impacted by changing CSS variables).
For that, you will have to put together your own theme, meaning defining your own primary, secondary, etc. theme colors, spacing, etc. (note: you won't have to override everything, only these values you want to change from the default behavior ; for instance, in your case, you can focus on colors and leave spacing etc. untouched).
Once your theme has been compiled into a stylesheet, use it as a replacement for the bare.css file (or CDN package) you were using until then. You can also dive into the details of the compiled stylesheet and manually change any of the rules you want.
My advice: experiment and tinker until you get the result you were looking for. You'll learn a lot in doing so. Good luck !

Flutter svg animation and manipulation

I have an SVG asset of a map, in which I have to change the color of some cities depending on the results of a network call. On the web, one normally would add a class to each path, give it some CSS, and toggle that class using JavaScript.
How can I achieve the same effect in flutter?
This can be done with the new version of jovial_svg. It supports embedded stylesheets, so you can use CSS exactly as suggested. Of course, you'd need to re-parse the SVG whenever there's a change, but that's not a big deal here.
Alternately, if it's just one set of cities, you could use SVG's currentColor, and set that value in the appropriate ScalableImage factory. But for your use case, CSS seems like the better way to go.
NOTE: At this exact moment, CSS support is in pre-release, but it should be formally released as 1.1.4 within a couple of days. In the meantime, see https://pub.dev/packages/jovial_svg/versions/1.1.4-rc.3

Swift naming conventions for UI elements (labels, buttons, etc)

Coming from the .NET world, I was used to naming my UI elements with the type prefix. Examples:
btnSend
lblName
etc...
The advantage is that in intellisense/autocomplete, the moment I start typing "btn..." I get to see the list of all my buttons.
However, I find that in Swift, the most common approach is to name UI elements with a type suffix instead:
sendButton
nameLabel
usersTableView
etc...
The problem is that I can't remember the names of all my buttons. When I start typing "butto...", I was hoping to see a list of all my buttons, but instead I'm seeing all the framework classes first, and I have to scroll down to see my stuff.
So, my question: is there a convention for naming UI elements? Does Apple recommend naming a button as sendButton instead of btnSend (or buttonSend)? Is there a setting in XCode that will allow me to see items I defined first in the autocomplete list?
You can use any style as long as you are consistent with it throughout your application but still, if you want to go through the design guidelines you can check swift-style-guide by raywenderlich and api-design-guidelines from Apple.

get PDF page title

Is it possible to get page title via iText?
The PdfTextExtractor returns all text from the page but I don't know what line is title. Also, title may contain more than one line
I don't know coordinates of title thus I can't use RegionTextRenderFilter
I can try to analyze the font size and take the line(s) with biggest font but TextRenderInfo doesn't provide public access to gs (private final GraphicsState gs)
Any other ideas?
Pages within a PDF don't have titles, they just have text that happens to be bold or in a large font and appears in an area you consider to be "more top" than other pieces of text. It sounds like you know this already, I just needed to be clear on this.
See my post here which shows how to get font information by subclassing ITextExtractionStrategy. My sample targets iTextSharp which is the .Net port of iText but they match pretty much feature-to-feature. The biggest differences is that Java uses getXXX and setXXX whereas .Net just uses XXX for both. Otherwise everything should port just fine.
The moral of the story is that you are going to have to write some arbitrary rules defining what you think of as a "title" and then parse based on those rules.

Help needed with farbtastic color picker. Simple example html included

I've included a very simple html example that almost works. It is a very plain implementation of this great color picker. But it doesn't quite work as advertised. I only get a single blue box and I can pick blue shades. But not the gradient or the outer ring.
Wait! I just realized that the outer ring is there, and I can change the colors with it. But its invisible! Weird....
Can anybody show me how to get the whole thing to work?
http://bizzocall.com/farbPicker.html
Thanks in advance!
the images for it are not pointing to the correct uri. http://bizzocall.com/css/marker.png returns a 404; point your images to the correct file and you should be straight
I have the farbtastic color picker working really well now. Just for those of you who want an example to take apart and look at, here's a link. The sytax of how the farbtastic function is called to send the color to numerous items on the page is the tricky part. But, its working here. Just look at the source...
http://bizzocall.com/cp-BizzoActiveButton.php