In July, the Ugandan government released a circular from the Ministry of Public Service that imposed a stricter dress code for male and female public servants.

Under these guidelines, men may not wear tight trousers, must wear a jacket and tie and keep their hair short and well-groomed. The dress code for women is much more detailed.

According to the circular, women should not dress in a short skirt that is above the knees and should wear a "smart" long-sleeved or short-sleeved blouse. Cleavage, navel, knees, and back must be covered at all times. The circular also provides guidance on hair, make-up, and nails for Ugandan women: Bright-coloured hair, braids or hair extensions, long nails, or bright or multicoloured nail polish are proscribed.

Violators of the code will receive warnings and women who violate the code are already being sent home from work. Repeat offenders could face disciplinary action.

The dress code guidelines are couched in the language of "decency", the idea of "dressing decently" or "smartly" - language that is often used in the postcolonial British English of former British colonies.

A colonial remnant

Decency campaigns, and the institutionalisation of dress codes, are not new to the East African and broader African postcolonial context. Historically, colonial civilising missions sought to instill European Victorian norms of "decency" and "respectability" within African indigenous societies, often seeking to "modernise" the minds, bodies, and psyches of African men and women.

One core arena of these practices was dress: nakedness or other forms of indigenous dress were viewed as "backwards", "primitive" and "traditional" in the worldview of the Western coloniser.

OPINION: Why is Tajikistan imposing a dress code on its people?

An example of the colonial legacy of "respectable dress" is what I call the "British civil servant aesthetic" in places such as Kampala and Nairobi: the requisite suit and tie, with dust-free, black leather shoes. Shiny, polished shoes are important for the making of respectable, urban masculinity among a generation of East African men.

Ugandan activists should not see the latest dress code as an isolated issue, or simply about the liberal, individual freedom to wear the miniskirt. Rather, I suggest that activists work to understand the context of gender and sexuality relations in the nation in a broader, global and political-economic context.

Debates about dress codes and what counts as "respectable" in broader society often peak during times of significant political, economic and cultural transformation. In the independence period, for example, new African nations formulated their own, distinctive "national culture", a culture that was dependent upon colonialism but also highlighted pre-colonial, indigenous African societies. The resulting cultural nationalism incorporated elements of pan-Africanism, Afro-centrism, and nativist nationalistic projects.

The 1960s and 1970s in East Africa was a key period in which "the politics of dress" emerged. Nation-state building often relied on both indigenous and colonial hetero-patriarchal projects (a system based on the supremacy of biological males gendered as "men" over females gendered as "women", and the primacy of heterosexuality).

Women were often marked as the traditional preservers of "native culture"; their bodies were seen to "reproduce the nation" and to symbolically represent the new African national culture. As inter-generational and gender tensions heightened in new East African nations, the old guard tried to preserve "African culture" from Western, neo-imperialist influences.

In 1968, for example, Julius Nyerere criminalised miniskirts for women and tight trousers for men in Tanzania. The Kenyan Parliament considered banning the miniskirt in 1969. In Uganda, many kinds of "decency campaigns" reached their height under Idi Amin, where the president banned miniskirts, hot pants, and wigs (weaves or extensions) among Ugandan women.

Why the new dress code?

In Kampala, the miniskirt became a popular discussion topic as a result of the latest dress code guidelines for public servants. But this is not a new discussion for the country. Previously, I have written about the 2014 Anti-Pornography Bill (the so-called anti-miniskirt bill) that sought to criminalise women who dressed "indecently" in public and "incited the desires of men to rape". This bill caused Ugandan women who chose to wear miniskirts to become the target of street harassment and even mob attacks. The bill was revised after widespread protests, and it is now a law that is designed to curb pornographic media from entering Uganda - media that the state links to the decline in Ugandan urban morality and cultural values.

The new dress code should be understood, just like the previous "anti-miniskirt bill", in the context of economic liberalisation (neoliberal transformation), rising urban inequality, shifting gender and sexuality roles and identities, and the rise of militarised masculinities in the nation.

OPINION: Knesset staff denied entry over 'mini' skirts

The state's "right" to control the bodies and sexualities of Ugandan men and women is meant to be a meaningful performance of national, cultural, and political autonomy from "the West" - in a context where Uganda is relatively powerless in the global hierarchy of nation-states.

Controlling women's bodies

What does the dress code mean for Ugandans today? First, the dress code, and its rationale (that women's indecently dressed bodies can incite sexual desires among men), exceeds the norms of professional workplace dress codes. Instead, it reveals the state's efforts to control the comportment of women's bodies at the expense of reforming men's sexual attitudes towards women. It is thus a further step in the institutionalisation of hetero-patriarchal norms in Ugandan society by the state.

Second, the dress code reveals efforts by the state to re-make gender roles in urban Uganda: the "decently dressed" versus the "indecent" Ugandan women. This is especially the case as many young women are excluded from educational access, job opportunities, and social and geographical mobility. At the same time they have more access to the idea of "the global": through mass media, through sharing knowledge of fashion and beauty trends, access to cheap commodities (including hair extensions), and ideas about youth style and self-expression. And in urban Uganda, one of the few routes to economic mobility for young women is through their intimate relationships with men, relations which often rely on the physical attractiveness and the objectification and commodification of their bodies under the male gaze.

Thus far, Ugandan women activists have openly condemned the dress code as an expression of authoritarianism by the central government.

In my previous analysis on the 2014 attacks on women in miniskirts, I situated the "moral panic" about women's dress in relation to the resurgence of anti-homosexuality legislation in Uganda, urging activists and commentators to link gender and sexuality struggles together while contesting hetero-patriarchal nation-state building in a global context, rather than a fight for individual rights and freedoms.

READ MORE: 'Miniskirt' assault protest draws thousands in Kenya

In this case, Ugandan activists should also not see the latest dress code as an isolated issue, or simply about the liberal, individual freedom to wear the miniskirt. Rather, activists should work to understand the context of gender and sexuality relations in the nation in a broader, global and political-economic context.

In doing so, activists can challenge the broader hetero-patriarchal spaces from which the dress code arose - by understanding the condition of possibility for the dress code, they may be more successful in unearthing alternative, home-grown possibilities for healthy gender relations in Ugandan society today. This remains a major task for today's feminist-oriented and progressive youth in Uganda.

Dr Anneeth Kaur Hundle is an Assistant Professor of Anthropology at the University of California.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial policy.