# Geo Style

### How Does It Work?

Geoflow evaluates the conditions defined in the Geo Style data attribute against the visitor data properties. If the conditions match (returns true), the internal or external styles will be applied. Otherwise, they will be left as-is and not applied.

By default, Geoflow will apply the styles if any conditions you have defined match (return true). You can override this default behaviour by applying the Geo Match data attribute.

### How To Implement

<table><thead><tr><th>Attribute Name</th><th width="266.3333333333333">Attribute Value</th><th>Which Page Element?</th></tr></thead><tbody><tr><td>type<mark style="color:red;">*</mark></td><td>text/geoflow</td><td>&#x3C;style> or &#x3C;link></td></tr><tr><td>data-geo-style<mark style="color:red;">*</mark></td><td>conditionName:conditionValue</td><td>&#x3C;style> or &#x3C;link></td></tr><tr><td>data-geo-match</td><td>all</td><td>Any element with the <strong>Geo Style</strong> data attribute.</td></tr></tbody></table>

The type attribute is required to prevent the browser from automatically running the CSS.

The condition name is case-sensitive and must match the 'Property Variable' for that visitor data property in the [Visitor Data Properties table](/geoflow-docs/overview/visitor-data-properties.md).

The case sensitivity and validity for the condition value depend on the data type. For example, when defining a condition based on a country code, the value must be an [ISO Alpha-2 Code](https://www.iso.org/obp/ui/#search/code/).

Any value other than 'all' added for the Geo Match data attribute will have no effect.

<mark style="color:red;">\*</mark>‎‏‏‎ ‎Attribute names with a red asterisk are required; all others listed in the table are optional.

### Example

```html
<!--
If the Visitor IS In Australia, Every Element's Font Color Will Change to Red
-->
<style type="text/geoflow" data-geo-style="countryCode:AU">

        * { color: red; }
        
</style>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.getgeoflow.com/geoflow-docs/feature/style.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
