I have tried : [cb_location] {color: #ededed} but it didn’t work.
That's not a valid selector. You'd end up with something like the following.
home {color: #ededed}
This assumes cb_location value is "home". So cb_location needs to be stored as a valid CSS selector you need to make it a valid selector on output. Example as follows.
.[cb_location] {
color: #ededed
}
Don't really recommend this though as fields are typically user supplied values. If it's a dropdown where you've full control of what value is stored in the database it should be safe or having strict validation rules on a text field might also be ok.
What exactly are you wanting to accomplish with this? That parameter basically just adds new CSS to the header of any page it's loaded on.